Passing a parameter to a query (1 Viewer)

ryetee

Registered User.
Local time
Today, 06:09
Joined
Jul 30, 2013
Messages
952
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?
 

Minty

AWF VIP
Local time
Today, 06:09
Joined
Jul 26, 2013
Messages
10,371
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
 

ryetee

Registered User.
Local time
Today, 06:09
Joined
Jul 30, 2013
Messages
952
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

Top Bottom