troubleshooting Question

Newbie Needs Help Filtering MSAccess Form

Avatar of mijwil
mijwil asked on
Microsoft Access
6 Comments1 Solution361 ViewsLast Modified:
I apologize in advance for my knowledge base. I am decent at developing databases using all of the canned features and query tools in Access. I am trying to learn VBA.

I am trying to filter 2 fields using as input the selections in a drop down combo box and an option box.

I have a combo box [CustomerSelect] that filters a customer name. (which by the way I don't completely understand the ampersand usage. another topic)

Me.Filter = "CUS_CorpName = """ & Me.CustomerSelect & """"

That works fine. Now I am trying to filter that further with my option box.

I have an option box [WOStatus] to select "Released" or "Complete" work orders using the values 1 or 2. The field I am trying to filter is [WKO_StatusCode]

If Me.WOStatus = "2" Then
        Me.Filter = "WKO_StatusCode= 'Complete'"
        Me.FilterOn = True

Can you help me with the correct syntax to filter both fields in one statement?
Inexperience and confused.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros