Iif trouble

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im trying to query a table with one of the criteria being from a Combo box in
a form. There are 2 options in the field, but if the user leaves it blank, I
want to pull both options. Right now, I have
Iif([Forms]![Main].[Combo35] Is Null, ????????????, [Forms]![Main].[Combo35])
I need the ???????? to pull everything regardless of the data in that field
 
Forget the IIf. Use this as the criteria:

Like [Forms]![Main]![Combo35] & "*"

It's possible that the above could cause problems. For example if an option
is "A", the statement would bring in all data beginning with A.
 
Im trying to query a table with one of the criteria being from a Combo box in
a form. There are 2 options in the field, but if the user leaves it blank, I
want to pull both options. Right now, I have
Iif([Forms]![Main].[Combo35] Is Null, ????????????, [Forms]![Main].[Combo35])
I need the ???????? to pull everything regardless of the data in that field

Forms!Main!Combo35 OR forms!Main!Combo35 is null
 
Back
Top