Criteria: OR works, AND does not works (1 Viewer)

Surka

IT dude
Local time
Yesterday, 23:12
Joined
Aug 5, 2013
Messages
41
Good day,

I am trying to make a filter form:
2 Combo box
1 subform with data to filter

Problem: If I use OR in criteria it works, subforms gets populated. But if I use AND it does not work.

Attached you will find an example with AND.

If you select A and AR result should be A and AR.

What is happening?

Thanks.

NOTE: I know that the "requery" is on each OnClick event of the comboboxes. I should use a button to requery, but I am more concerned about the criteria.
 

Attachments

  • Filter Example.accdb
    932 KB · Views: 70

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:12
Joined
Aug 30, 2003
Messages
36,125
You can't use the .Text property in your criteria; it requires focus, which obviously they can't both have.
 

vbaInet

AWF VIP
Local time
Today, 03:12
Joined
Jan 22, 2010
Messages
26,374
Amended. See attached.

In addition to what Paul said, the LIKE operator is not necessary.
 

Attachments

  • Filter Example.accdb
    492 KB · Views: 76

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:12
Joined
Aug 30, 2003
Messages
36,125
You must be really be bored?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:12
Joined
Aug 30, 2003
Messages
36,125
No problem.
 

Users who are viewing this thread

Top Bottom