IIf ststement in criteria

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

Guest

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?
 
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!
 
Back
Top