Help with a query criteria expression!

michal79

Registered User.
Local time
Today, 20:41
Joined
Nov 27, 2012
Messages
14
Hi,

I have a lessons learned database. One field is called KeyLL i.e. it defines whether a LL record is a key one or not. I need a cirteria on my query that makes it possible to display both "Yes" & "No" values for my KeyLL field.

On my search form I have a combobox called CheckLL where I can select "All"; "Yes" or "No". In my table the values stored are only either "Yes" or "No". With the following criteria statement it works perfect if I select "Yes" or "No" however how can I design the criteria so that when selecting All from the combo I'll be able to display all lessons leanred both the ones that have been marked as key ("Yes") and not ("No").

Like "*" & [Forms]![NavigationForm]![NavigationSubform]![AdvSearchF]![CheckLL] & "*"

I have tried with different combincations of IIf statements and nested IIfs but I must keep on doing something wrong.

Help !

Thanks to all of you fine people :-)

Michal
 
Don't use Like, try

Where Keyll= [Forms]![NavigationForm]![NavigationSubform]![AdvSearchF]![CheckLL] or [Forms]![NavigationForm]![NavigationSubform]![AdvSearchF]![CheckLL] = "All"

Brian
 

Users who are viewing this thread

Back
Top Bottom