If statement that returns all entries or one

  • Thread starter Thread starter Paul Washburn
  • Start date Start date
P

Paul Washburn

Im trying to write criteria for a query field that accepts a value from a
combobox on another form. Could someone help me with the syntax for
returning all records if the user leaves the combobox blank. Below is what i
have so far and if the user leaves the combobox blank it doesn not return any
records.

IIf([Forms]![ManuRpt]![cboManufacture]=Null,"",[Forms]![ManuRpt]![cboManufacture])

Thanks in advance for the help
 
I assume this is in the criteria of a query. If so, try:
[Forms]![ManuRpt]![cboManufacture] or [Forms]![ManuRpt]![cboManufacture] Is
Null
 
Worked perfectly, thanks

Duane Hookom said:
I assume this is in the criteria of a query. If so, try:
[Forms]![ManuRpt]![cboManufacture] or [Forms]![ManuRpt]![cboManufacture] Is
Null

--
Duane Hookom
Microsoft Access MVP


Paul Washburn said:
Im trying to write criteria for a query field that accepts a value from a
combobox on another form. Could someone help me with the syntax for
returning all records if the user leaves the combobox blank. Below is what i
have so far and if the user leaves the combobox blank it doesn not return any
records.

IIf([Forms]![ManuRpt]![cboManufacture]=Null,"",[Forms]![ManuRpt]![cboManufacture])

Thanks in advance for the help
 
Back
Top