Passing a parameter to a query

ryetee

Registered User.
Local time
Today, 14:25
Joined
Jul 30, 2013
Messages
965
I have aform which uses a query as the data source. The query uses a couple of fields on the form as parameters.
eg the criteria on the customer field in the query is [forms]![Customer]![txtCustomer]. I want to override this to pick all customers. Is there a clever way of doing this or am I going to have to have potentially 2 forms and 2 querie?
 
In your query criteria use the following to return all values if the txtbox is null;

Code:
[forms]![Customer]![txtCustomer] OR [forms]![Customer]![txtCustomer] Is Null
 
In your query criteria use the following to return all values if the txtbox is null;

Code:
[forms]![Customer]![txtCustomer] OR [forms]![Customer]![txtCustomer] Is Null


Thanks for this but just discovered how to use the filter!
 

Users who are viewing this thread

Back
Top Bottom