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 / New Users / June 2006

Tip: Looking for answers? Try searching our database.

creating a combo box that filters a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Newby - 02 Jun 2006 13:40 GMT
I want to create a combo box that filters a form

Filter:
Active
All
Inactive

I have a true/false field for active/inactive items

Thanks for any and all help!
Signature

Chris Hayes
Newby

Ed Robichaud - 02 Jun 2006 14:49 GMT
Since you have a fixed and small range of choices, you could also use an
option group (radio buttons) to select which set of records to display.  Use
the tool wizard to create an option group, then and something like below to
the option group control's AfterUpdate event:

Private Sub FilterGrp_AfterUpdate()
'Apply filter button choice
   If FilterGrp = 2 Then
       Me.Filter = "[myField]=0"
       Me.FilterOn = True
   ElseIf FilterGrp = 1 Then
       Me.Filter = "[myField]=-1"
       Me.FilterOn = True
    Else
       Me.FilterOn = False
    End If
End Sub

-Ed

>I want to create a combo box that filters a form
>
[quoted text clipped - 6 lines]
>
> Thanks for any and all help!
Newby - 02 Jun 2006 16:09 GMT
Sweet!, I'm not a VB person but I figured what to change to fit my db and it
works! and that is awesome!
Signature

Chris Hayes
Newby

> Since you have a fixed and small range of choices, you could also use an
> option group (radio buttons) to select which set of records to display.  Use
[quoted text clipped - 26 lines]
> >
> > Thanks for any and all help!
 
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.