Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2008

Tip: Looking for answers? Try searching our database.

VB code for multiple filter in form?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cam - 14 Feb 2008 22:41 GMT
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
Allen Browne - 15 Feb 2008 01:50 GMT
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.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hello,
>
[quoted text clipped - 15 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.