From: Basenji on
Using Access 2003 I have a form with combo boxes for selecting criteria for a
query. I would like for the user to be able to select a specific critieria
from the combo box list or hit enter for all. I have the following expression
in the criteria row for the location field,
Like [Forms]![frmLocaDatePhyProc]![CLocation] & "*"
for the procedure field
Like [Forms]![frmLocaDatePhyProc]![CProcedure] & "*"
The enter key for all works fine but when a specific criteria is entered for
one of the combo boxes, there are no records returned.
What do I need to do differently?
From: ghetto_banjo on
if no criteria is selected, is the combo box Null?

if so, you could use this:

Like NZ([Forms]![frmLocaDatePhyProc].[CLocation], "*")


Note to use use ! after Forms and just a period after the form name.