Filtering forms

Tskutnik

Registered User.
Local time
Today, 17:06
Joined
Sep 15, 2012
Messages
234
Simplest question ever and I can find the answer. I have a form [Accounts] which reads from a single table [Account.Data]. There are a few fields in the form and table, one of which is [Status].

I want a combo box at the top of the form that filters the [Status] field. The default value needs to be "Open", which will only show the records with [Status] = "Open". When the user selects a different value in the combo box, e.g. [Status] = "closed" , the form automatically filters to the record with those values.

So simple I'm sure.

Thanks
 
In the after update event of the combo try:

Me.Filter = "Status = '" & Me.ComboName & "'"
Me.FilterOn = True
 
Filter the form record source with the "status" combo box name. Note that the full form reference is required, not a Me reference, i.e. Forms!YourFormName!YourComboBoxName
 

Users who are viewing this thread

Back
Top Bottom