Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter for 2 values

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
Hi All
I am trying to filter a form by using 2 different values.

I tried:
Me.Subform.Form.Filter = "[Interval] = '3M'" Or Me.Subform.Form.Filter = "[Interval] = '2M'"
Me.Subform.Form.FilterOn = True
Didn't Work.
I also tried using And insted of Or. Didn't Work either.

Any suggestions on how to do this?

Regards
S.
 
Try either

Code:
Me.Subform.Form.Filter = "[Interval] = '3M' Or [Interval] = '2M'"
Me.Subform.Form.FilterOn = True

or

Code:
Me.Subform.Form.Filter = "[Interval] in ('3M','2M')"
Me.Subform.Form.FilterOn = True

The second form is somewhat better readable if you have more choices to filter on

Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top