Form Problem

CharlesWilliams

Registered User.
Local time
Today, 10:53
Joined
Dec 7, 2004
Messages
70
If anyone can help it would be greatly appreciated.

I am trying to get the form to pull a report by 1 salesman in the salesman combobox or if nothing is selected all salesman. I've tried using a union query with no success and tried different criteria in the VBA and query. I also want it to be able to pull by salesman and date range.

Eventually I will be setting up each of the criteria boxes to pull data
 

Attachments

Untested, but for the "all" try this:

DoCmd.OpenReport Me.CboReports, acViewPreview

instead of

DoCmd.OpenReport Me.CboReports, acViewPreview, , "[Salesman] = '*'"
 
Try using this in your query under the criteria for the column you want to filter with your combo box.

Like IIf(IsNull([Forms]![YourFormName]![combo5]),"*",[Forms]![YourFormName]![combo5])

Change the name of combo5 to the correct combo and the YourFormName to the correct form.
 
Thank yo for the quick responses. i will try them out on Monday and let you know.
 

Users who are viewing this thread

Back
Top Bottom