Filters on Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi - I have a form that we use to enter issues into. There are multiple fields for status, classification, module, etc... how can I create a form/view that would allow me to filter on one or multiple of these fields and pull in just those records. We are on Access 2003 and Not even sure how to start. I have tried using the filters however becuase one is an auto number.. it's not allowing it.
 
Click on the Filter By Form button on your toolbar.
The form will look almost the same, but you can type filter data into any
control you like.
Then click the Filter button on the toolbar.
Your form should appear with the filtered data.
Click the Filter button again to remove the filter.
Autonumbers should not be a problem.

HTH
- Turtle

Bobby said:
Hi - I have a form that we use to enter issues into. There are multiple
fields for status, classification, module, etc... how can I create a
form/view that would allow me to filter on one or multiple of these fields
and pull in just those records. We are on Access 2003 and Not even sure how
to start. I have tried using the filters however becuase one is an auto
number.. it's not allowing it.
 
Thanks MacDermott...I tried ,but it doesn't seem to want to work for my application. I guess I should say that after I sent the first note I put a form header together with the different fields to search on. Then I built a subform that has the data that I would need... one issue I have is that I can have any combination of filled in for 8 combo boxes.. is there any way to write code or something to put a wildcard on the fields that are not populated in the form header and then run a query based on all eight values to only pull those records that are pertinent? thx
 
There are several different methods you can use to filter your record
coming in to a form.

If you have a field in the form that you wish to use to filter by the
create an event procedure on the after update event of that control.

Inside the code create a Select statement....

Dim strSel as String
strSel = "Select * from table where fieldname = '" & filtertext & "'"
Me.Recordsource = strSel

the form will automatically update with the new recordsource
 
I'm not sure why you're using a header AND a subform -
couldn't you just show your main form in Continuous forms view?

As for your "wildcard" question, take a look at this page for some ideas:
http://www.mvps.org/access/queries/qry0001.htm

HTH
- Turtle

Bobby said:
Thanks MacDermott...I tried ,but it doesn't seem to want to work for my
application. I guess I should say that after I sent the first note I put a
form header together with the different fields to search on. Then I built a
subform that has the data that I would need... one issue I have is that I
can have any combination of filled in for 8 combo boxes.. is there any way
to write code or something to put a wildcard on the fields that are not
populated in the form header and then run a query based on all eight values
to only pull those records that are pertinent? thx
 
Back
Top