Filter help

G

Golfinray

I have not been able to get a filter to work and now I quit and ask you guys.
I have a form with 7 text boxes. I want to filter by selection on ONE text
box. I want to have a command button, textbox, combo box or whatever where
the user selects a school district (one of 255) and the form takes them to
the beginning of records on that district ( and there may be several.) I
never could get a search command button to work properly. The command button
for search did not let me search on the textbox I wanted to search on. I'm
missing something. Help! Thanks!!
 
K

Klatuu

It is always best to use an unbound combo box to search.
Then you want to filter your form based on the value in the combo box, use
the combo box's After Update event:

Me.Filter = "[SchoolDistrict] = """ & Me.MyCombo & """"
Me.FilterOn = True

Where [SchoolDistrict] would be the name of the field in the form's
recordset that identifies the school district. The above syntax assumes it
is a Text field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top