Using a form to enter criteria

J

Jamie Dickerson

I have a report that is based off of 3 different queries. Right now I
manually enter the filter criteria (employee ID) into the queries prior to
printing the reports. I would like to creat a form that asks for the
employee ID (only once) then moves the information to all 3 queries, after
criteria is entered the report will print. I have had trouble getting the
form to move the criteria to all the queries, the only solution I came up
with is to enter it 3 times. Any help or suggestions is appreciated.

Thank You in Advance

Jamie
 
K

KARL DEWEY

Create the form with unbound text box. In the queries use this as criteria --
[Forms]![YourFormName]![TextBoxName]
The form must have the information and stay open when running the report.
 
K

Klatuu

Assume your form name is frmEmp, the control on the form is txtEmpID

In the query it would be
WHERE [EmpID] = [Forms]![frmEmp]![txtEmpID]
 
D

Dorian

You don't 'move the information to all 3 queries'.
Instead the query refers to the control on the form e.g.
Forms!MyCriteriaform!MyEmployeeIdcontrol
Provided the form is open when the queries run, the reference should be
resolved.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 

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