VB code for multiple filter in form?

  • Thread starter Thread starter Cam
  • Start date Start date
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
 
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.
 
Back
Top