sullivan
09-19-2001, 08:22 AM
I would like to use parameter queries to make printing reports easier for the user. Unfortuantly, it they are making things more difficult. I made one query into a parameter query, which causes all the wanted reports to prompt the user for a Name. The problem is, on reports were there is a subreport the prompt is coming up repeatedly, about 6 times, and then once the report opens if the user tries to move to the next page the prompt comes up again. Does this sound right, or does anyone have a suggestion for me. Thanks in advance.
Jack Cowley
09-19-2001, 09:37 AM
Create an unbound form with an unbound text box on it. Create your parameter query and in the Criteria row of the column that you want to select put code similar to this:
[Forms]![UnboundFormName]![UnboundFieldName]
Open your report and base the report on the query. Go back to your form and create a command button to open your report. Put a label on the form telling the user to enter the criteria in the text box and then click the button to print the report.
That should do it for you. Do not close the form until the printing is complete as the query needs to get the criteria from your form and the form must be open for that to happen.
sullivan
09-24-2001, 08:06 AM
I got the form to work great, thanks for the suggestion Jack. One question though. The query that I made into a parameter query is pulled by many other queries in the db, which is great. However, I have a union query that pulls 6 other queries together. Each of the queries is connected to the parameter query. The problem is, I need the query to pull more than one name for this one report. The form will only allow me to type in one name. Is there a way around this problem? Thanks.