IIf ststement in criteria

C

Chip Coutts

I have a switchboard with an unbound combo box. If I want to display only
the records for CampusCode=1, I pulldown that CampusCode on the switchboard,
and the query has criteria [Forms]![Switchboard]![CampusCode], and it works
fine. However, I would like to be able to display all records in the table
if nothing is selected in the pulldown. I have tried
IIf([Forms]![Switchboard]![CampusCode] Is Not
Null,[Forms]![Switchboard]![CampusCode],????)
The True condition works, but I cannot get the False condition to return all
records.
Any thoughts?
 
C

Chip Coutts

I am embarrassed to reply to my own post, but I did find a solution...
IIf([Forms]![Switchboard]![CampusCode] Is Not
Null,([Forms]![Switchboard]![CampusCode]),([Assessments].[CampusCode]))

Thanks!
 

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