Filter using two criteria

B

BrookieOU

I have a form that has a combo box that I am using for my filters. That
combo boxed is based on a table that defines the filters. I am having
problem writing the Filter String so that it uses two criteria.

I would like the filter to be based on an employee table and reference the
"Active_Employee" field and the "Client" field. I want the "Active_Employee"
field to be "Yes" and the "Client" field to be "1". Here is how I currently
have it written: ([Employee Detail].[Active_Employee]=Yes) & ([Employee
Detail].[ClientID]=1). When I run the filter it does filter by the correct
ClientID, but it doesn't apply the "yes" criteria for the "Active_Employee"

Anyone know why?

Thanks,
Brooke
 
B

BrookieOU

Yeah, I was just coming back on to say I figured it out. Thank you!

Jerry Whittle said:
I believe that you need the word AND instead of the ampersand &.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


BrookieOU said:
I have a form that has a combo box that I am using for my filters. That
combo boxed is based on a table that defines the filters. I am having
problem writing the Filter String so that it uses two criteria.

I would like the filter to be based on an employee table and reference the
"Active_Employee" field and the "Client" field. I want the "Active_Employee"
field to be "Yes" and the "Client" field to be "1". Here is how I currently
have it written: ([Employee Detail].[Active_Employee]=Yes) & ([Employee
Detail].[ClientID]=1). When I run the filter it does filter by the correct
ClientID, but it doesn't apply the "yes" criteria for the "Active_Employee"

Anyone know why?

Thanks,
Brooke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top