If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using a form to enter criteria
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 |
#2
|
|||
|
|||
Using a form to enter criteria
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. -- Build a little, test a little. "Jamie Dickerson" wrote: 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 |
#3
|
|||
|
|||
Using a form to enter criteria
Assume your form name is frmEmp, the control on the form is txtEmpID
In the query it would be WHERE [EmpID] = [Forms]![frmEmp]![txtEmpID] -- Dave Hargis, Microsoft Access MVP "Jamie Dickerson" wrote: 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 |
#4
|
|||
|
|||
Using a form to enter criteria
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". "Jamie Dickerson" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|