VB code for multiple filter in form?

C

Cam

Hello,

I have a form with a unbound field to input to filter out the data, what do
I put in the code to filter two unbound fields instead of one? Other unbound
field is named SelectSide. Thanks
Here is my current code.

Private Sub SelectItem_AfterUpdate()

' Find the record that matches the control.
DoCmd.ApplyFilter , "tbl_Item = Forms!frm_MCHMC_Expect_Edit!SelectItem"
EnableControls Me, acDetail, True
Me!tbl_MCID.Enabled = False
Me!SelectItem.SetFocus
Me!SelectItem.Requery

End Sub
 
A

Allen Browne

Cam, take a look at this example:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

There's a downloadable example for you to pull apart. It illustrates how to
create a filter based on any combination criteria the user chooses, even
fields of different types, or ranges of dates.
 

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