1 Form, 1 query, different criteria on diferent tabs

  • Thread starter Thread starter kellythekid
  • Start date Start date
K

kellythekid

I have designed a form which allows me to edit records in my database.
The data is a list of issues and each record has a status ID (1=Review,
2=In Progress, 3=Completed, etc.). The form contains several tabs (one
for each Status) and ideally I would like to use the same form in each
tab but each form should use the same query except the criteria on the
status should change to filter record with that status ID only. I am
not an expert with Access and have not been able to figure out how to
do this. I have an idea but not sure how to code it (to use the same
form on each tab with the query using a variable on the criteria field
and some how on_click of the tab, assign the appropriate status ID to
the variable and load the form and run the query). Again, not sure how
to code this but also I have the impression that the queries on each
form are already ran on Form Load so on tab click the form is made
visible with the results rather and running the query on click. In
either case, what I have done so far is to copy the form many times and
change the query criteria to filter by status. It's a maintenance
nightmare as I have to modify all form with the same changes each time
I need to change the form layout/design. Any ideas?
 
I would think that you would only need one form to accomplish what you are
describing.

You might consider placing a group control in the header of your form. Then
place three option buttons in the group control, one for each of the status
values.

Then you can simply filter the form based on the selection of one of the
options in the group control.
 
Back
Top