WildCards referencing null entries

bunji

Registered User.
Local time
Today, 16:20
Joined
Apr 26, 2005
Messages
124
I have a Qry that has a criteria of

Like "*" & [Forms]![FrmSearch![Cmbo1]

However on this field there are null field entries and even if the cmbo box is null it wont display these results.

I tood out the & [Forms]![FrmSearch![Cmbo1] section and just left the wild card and again only displayed the records where this field had an entry.

How can i get it so that when no selcetion has been made in the combo box all the records show up.

Many Thanks
 
Try this


Like IIf(IsNull([Forms]![FrmSearch.[Cmbo1]),"*",[Forms]![FrmSearch.[Cmbo1])
 
I have a Qry that has a criteria of

Like "*" & [Forms]![FrmSearch![Cmbo1]

However on this field there are null field entries and even if the cmbo box is null it wont display these results.

How can i get it so that when no selcetion has been made in the combo box all the records show up.
The LIKE operator cannot return Null values.

You can set the criteria like this in a new column in the query grid (using the correct FieldName):-

---------------------------------
Field: [FieldName]=[Forms]![FrmSearch![Cmbo1] or [Forms]![FrmSearch![Cmbo1] Is Null

Show: uncheck

Criteria: True
---------------------------------
.
 

Users who are viewing this thread

Back
Top Bottom