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.