Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Query Prompts Twice

Status
Not open for further replies.

Garridon

Programmer
Mar 2, 2000
718
US
I've been working on a report and a subreport that has some calculations in it. Subreport displays the records and calculates the total number. Main report takes that total, counts the overdue records and divides it to get a percentage.

My user wanted to be able to pick a date criteria, so I inserted Between [Beginning Date] and [Ending Date] into the query for the subreport, where all the records are displayed. When I open the report, it prompts me twice for the set of dates. What is causing this?

Thanks!
Linda Adams
Visit my web site for writing and Microsoft Word tips:
 
Hi Linda!

It sounds like your report and your subreport are based on the same query. What is the recordsource for each?
Jeff Bridgham
bridgham@purdue.edu
 
They're actually two different queries--I had to do a subreport because I needed it to count the total number of records and the total overdue to get the percentage. Both queries have a common field--dateClosed. The main report counts records that are overdue based on dateClosed and dateDue. The subreport counts the total number of records based on dateClosed.

Linda Adams
Visit my web site for writing and Microsoft Word tips:
 
Hi Linda!

Sorry to take so long answering. Maybe you could send me the database(zipped) or a blank database with the report, queries and tables involved. If you can do that, I'll take a look at it to see if I can figure out what is happening.

hth Jeff Bridgham
bridgham@purdue.edu
 
I have run into times where a parameter is prompted more than once as well. My cases were caused by a sort after the query ran once. Then when Access sorts the data, it actually runs the query again and therefore prompts the user again. Are you sorting the results before displaying the report?

The way I got around it was using a form with a dropbox to hold the value the user wants as a parameter. Then pointed the query to look at the dropbox on the form when running the query. It still runs twice, but the user isn't prompted over and over for the parameter.
Bryan Meek
bmeek@pacbell.net
A "Solution Provider" in your corner gives you the personal attention you need to find the right technology solutions for your business.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top