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 / Forms Programming / January 2005

Tip: Looking for answers? Try searching our database.

Combobox filter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bobw - 04 Nov 2004 20:44 GMT
Help me with my combo box filter please,
I have read all of the posts within this group and I cannot figure this one
out.  I know it's a simple fix.

Private Sub cmbfilter_AfterUpdate()
Me.Filter = "status = " & Me.cmbfilter
Me.cmbstatus.Requery
Me.FilterOn = True

End Sub

Thanks in advance,
Bob W.
fredg - 04 Nov 2004 21:49 GMT
> Help me with my combo box filter please,
> I have read all of the posts within this group and I cannot figure this one
[quoted text clipped - 9 lines]
> Thanks in advance,
> Bob W.

It would have been nice had you also posted what problem you are
having.

This works for me in the combo's AfterUpdate event, to filter the
form's records according to the selection of the combo box.
It assumes the bound column of the combo box is a Number datatype.

Me.Filter = "SomeField = " & Me.ComboBox
Me.FilterOn = true

If the bound column is text then use:
Me.Filter = "SomeField = '" & Me.ComboBox & "'"

Now if it doesn't work for you, how about letting us know what you are
trying to do, the datatype of the combo bound column, and what does
happen.
Signature

Fred
Please only reply to this newsgroup.
I do not reply to personal email.

JohnC - 11 Jan 2005 16:21 GMT
I not sure as I have had a similar problem but you could try this:

Private Sub cmbfilter_AfterUpdate()
Me.Filter = "[status] = " & Me.cmbfilter & "
Me.cmbstatus.Requery
Me.FilterOn = True

Sorry if it doesn't help.

> Help me with my combo box filter please,
> I have read all of the posts within this group and I cannot figure this one
[quoted text clipped - 9 lines]
> Thanks in advance,
> Bob W.
 
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.