Criteria??

slyvsspy

Registered User.
Local time
Today, 14:13
Joined
Jun 24, 2002
Messages
51
In my query, for the criteria i pull the information from an unbound text box on a form. The code looks like this in the criteria box.

[Forms]![multipleselectform]![RepubUnbound]

When the "value" in the unbound text box is "R" , then the query runs fine, but if the "value" in the unbound text box is "blank" , which it needs to be sometimes since some of the records don't have anything for that field, the query won't work.

What value can I send to the query to tell it to pull off all the fields not equal to "R". And what value can I pass to the query to tell it to pull all the records and don't worry about a filter??

any help is much appreciated,
thanks JOSH
 
For your query criteria, use:
Like Nz([Forms]![multipleselectform]![RepubUnbound]
,"*")

To get all the fields where the criteria is <>"R", you have to create a command button on your form for the user to switch between Like and Not Like modes. Then using the OnClick event, switch between queries or modify the SQL programatically.

Hope this helps
 

Users who are viewing this thread

Back
Top Bottom