I have a database that produces different "cuts" of data for the user
to export into excel. The database essentially opens queries using
different criteria to filter the data as the user wants it. The user
can then print or export to excel depending on the need.
So I have a form that allows the user to specify how the data should
be cut. I'm stumped on one aspect of this. I have a field called
"Category" that has 10 possible values. None of the records have a
null value for this field. I would like to have a checkbox (or another
type of control) on my form that a user can check off. When the box is
checked, the query will open and exclude any records that have one of
5 values for that field. Any records with a value other than one of
those five would be displayed. Essentially, I am trying to exclude
temporary and per diem employees from the query (if the user wants
them excluded), and the category value for temps & per diems can be
any of 5 values. So it's not straightforward to exclude them.
I'm not a sophisticated programmer. So any simple approaches would be
appreciated. I had thought of setting up separate queries (so a
different query opens if the box is checked), but I need to repeat
this process on a few other queries, and this would be a cumbersome
approach.
Another thought (just occuring to me now) is to create new "field" in
the query (using code) that determines which employees are temps/per
diems with a case statement and returns a single uniform value for any
temps/per diems. And then, if the box is checked, send one value to
the criteria line of that new "field" to exclude them. Would that
work?
Thanks.