using filter in a form???

KulasCage

Registered User.
Local time
Today, 11:43
Joined
Jan 17, 2003
Messages
66
Guys,

on form open, all records are displayed... i want to filter it by using a unbound combo box which point to "file number" field.

When i select any file number from the combo box, my form should filter my records and display only the one i selected.

then i want to have a command button to remove that filter.

anyone.

thanks.
:rolleyes:
 
Check out the Filter property in the Help file.

For your AfterUpdate event of your unbound ComboBox, you'd set your Filter based on the chosen value, then apply the FilterOn property (also in the Help file) => Me.FilterOn = True.

Use Me.FilterOn = False for the Click event of your CommandButton.

HTH,
John
 
jjturner, sad to say my combo box filter doesn't work.
 
What i did is like this, but a blank display appear.

Sub Combo60_AfterUpdate()



Me.FilterOn = True
DoCmd.ApplyFilter , (Me![file number] = [Combo60])

End sub


Anyone...i need ur help.

thanks
 
Code:
Sub Combo60_AfterUpdate()

Me.Filter = "[File Number] = " & Me.Combo60.Value
Me.FilterOn = True

End Sub
 
KulasCage,

I noticed your other post on this subject. Be advised that re-posting the same topic is frowned upon here. You'll want to avoid doing this in the future, otherwise people whose time you waste with the extra post will just ignore anything else you post to this forum, myself included.

John
 
I apologize to that, thanks for your help. I found my coding error.

good day.
:)
 

Users who are viewing this thread

Back
Top Bottom