If statement that returns all entries or one

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
 
D

Duane Hookom

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

Paul Washburn

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top