M
Maver1ck666
I am having some difficulties setting a combo box as a filter on a main form.
I have a single form with the record source set as a query. Within the
detail section, it shows all the records currently logged on the database
which can be scrolled down (currently about 150 records showing).
What I want to do is to add a number of combo boxed as filteres iin the form
header which will
a) provide a list based on what has been logged
&
b) when a value is selected, show all records that match.
I currently have a number of unbound text boxes with an event procedure on
after update set as:
Private Sub Filter1_AfterUpdate()
'sets the filter1
DoCmd.ApplyFilter , "" & Me.Filter1.Tag & " = " & Me.Filter1 & ""
End Sub
No this method works fine but I obviously dont get a selection list to
choose from.
I then created a combo box, used the wizard to select the list of entries
based on the field in the query then adapted the sql code so that it groups
the exact matches together. I can't however, seem to get the code behind the
combo box to apply the selected criteria in the detail section.
Any ideas please?
I have a single form with the record source set as a query. Within the
detail section, it shows all the records currently logged on the database
which can be scrolled down (currently about 150 records showing).
What I want to do is to add a number of combo boxed as filteres iin the form
header which will
a) provide a list based on what has been logged
&
b) when a value is selected, show all records that match.
I currently have a number of unbound text boxes with an event procedure on
after update set as:
Private Sub Filter1_AfterUpdate()
'sets the filter1
DoCmd.ApplyFilter , "" & Me.Filter1.Tag & " = " & Me.Filter1 & ""
End Sub
No this method works fine but I obviously dont get a selection list to
choose from.
I then created a combo box, used the wizard to select the list of entries
based on the field in the query then adapted the sql code so that it groups
the exact matches together. I can't however, seem to get the code behind the
combo box to apply the selected criteria in the detail section.
Any ideas please?