filter by selection button

Purdue22

Registered User.
Local time
Today, 22:57
Joined
May 11, 2001
Messages
25
I am trying to create a button that uses the filter by selection command. Could someone supply me with the code to accomplish this.

Thanks
 
This is how I filter records to show a specific plant, selected from a combo box:
' Dim these fields
Dim theFilter As Variant
Dim thePlant As Variant

'then in your filter button click event
'you would want to add error routines, etc
thePlant = Me.cboPlant

theFilter = "[Plant] = '" & thePlant & "'"

DoCmd.ApplyFilter , theFilter

'I'd also recommonend building a button to show all the records again. The code on its click is
DoCmd.ShowAllRecords
 

Users who are viewing this thread

Back
Top Bottom