If you have a number of fields on a search form, some of which the user may leave blank, you could use the following in the criteria of your query for each field;
Code:
Like IIf(IsNull([Forms]![YourFormNameHere]![YOurFieldNameHere]),"*",[Forms]![YourFormNameHere]![YOurFieldNameHere])
Here is the issue. I have a payroll database, that has a table for Employees, Payroll, and Users (for logging in). If I want to create a report, I can make a query for each of the fields that I wish to sort by in the report (without including each and every field in said report), and then make the report of that query.
However, if I want to create just one query, and change the criteria of the query with a combo box on a form, perhaps, how would I do so. I haven't posted enough so I don't think that I can upload my DB yet.
I think I've found a way to specify what it is that I want to do. By the way, thanks for the link, but to be honest it was a bit over my head.
The search form I have has a combo box for the name, and two textboxes for start and end date. The second combo box, I want to select that field from the payroll table and remove all the rest from the query (or create a query with only that field as the source, and then output to a report. Here is the db file.