All Record Criteria Returned from Function

rube

Registered User.
Local time
Today, 14:51
Joined
Jun 21, 2003
Messages
76
I have a multiple category query.

Each field is assigned criteria from a Function.

The five criteria from the Query Form, are not all required, so if they are marked "Not Selected", I want to accept all records for that field.

In the query I have ProductCategory1()

In the module,
Function ProductCategory()
If forms![frmQuery]![cboCategory1] = "Not Selected" Then
ProductCategory = THIS IS THE CRITERIA I CAN'T MAKE WORK
Else
ProductCategory=forms![frmVendor]![cboCategory1]
Endif

I know Like "*", or a blank criteria will allow all records, but if I try to pass this from the Function it fails. The

Thanks for any help...
 
Use the method you will find here instead of the method you are using now.

hth,
Jack
 
Thanks Jack. You are awesome, worked like a champ. I think I had stared at it so long I wasn't thinking straight.

Chris.
 
Chris -

You are welcome. Continued success with your project.

Jack
 

Users who are viewing this thread

Back
Top Bottom