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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access is asking for too many parameters 2

Status
Not open for further replies.

Sdaddy

MIS
Nov 6, 2002
41
US
I have a report embedded inside another report, which is acting "somewhat" as a Summary Page for the beginning of the "main" report. Each report works off of the same query. Both reports have date range parameters. When separated, the reports work fine.
My problem however is since I have embedded the report, I am now being asked for the parameters a total of 6 times. 3 times before the report is displayed(which is normal, from what I understand), but also another 3 times when I attempt to export or print. It takes the same amount of time to export as it does to run the report. I am totally baffled by this. The report still works fine and accomplishes what I need, but this increases the amount of time it takes to do it, and can be a big inconvenience.

Any suggestions or fixes are greatly appreciated.

Sean
[machinegun] [auto] [flush3]
 
Sean,
Save a copy of the report.
Open the original report in design view and look at the properties of the report. Under "Order By" if there are entries erase them. I had the same problem a year or so ago and this worked for me.
jim
 
Jim,
I didn't have anything in there, I tried turning off the Order by feature, but nothing changed. Thanks anyway. H#ll anything is worth a shot. I think if someone told me that if I turn my computer to a 45 degree angle, stood on my head and yodelled while running the report, I'd try it.


Sean

[machinegun] [auto] [flush3] [lightning]
 
Your problem is really simple. All you have to do is turn your computer at a 45 degree angle, stand on your head, and yodel. Then generate the report. You'll be out of breath and your head will hurt, so the report problem won't seem so bad......

Here's something to try:

Are all the parameters the report is asking for exactly the same? I've had cases where I changed the name of a parameter, and still had fields with the old name. So it asked me for "builddate" , the "Build Date", the "Date". One way to find out is to put different dates in each time, and see what you get.

Is your query based on a table(s), or on another query? If it's based on another query, does that query have parameters, too. If so, try to get rid of them and put all the parameters in one query.

Another thing to try is to eliminate the parameters from the query. your report should run then without prompting you (although it won't be filtered at all, of course). If you still get prompted, you have a field in the report that is looking for a different parameter, somehow. If the report runs without prompting, add the parameter back in the query and see if it runs.

I assume one report is the main report and the othe is a subreport, right. Try deleting the subreport from the main one, then put it back in again.

My experience with exporting or printing reports is that, even if they're already generated, they generate all over again. I think that's just the way it works, so usually I just have it print, without displaying, if what I want is a printed copy.

Good luck
 
Turning the computer to a 45 degree angle, standing on your head and yodelled while running the report does not work...
Computer angle should be 90 degrees, you should keep your feet in your pockets and actually it's rap music that displays the report without prompts...

Your query parameters should look like:
Forms![YourFormName]![Date1]
Forms![YourFormName]![Date2]
Forms![YourFormName]![Date3]

Create the form YourFormName with the text boxes Date1, Date2 and Date3 to provide the parameters to the query and keep the form open while displaying or printing. A 'preview report' button on the form:

Sub butPreview_Click()
Me.Visible = False
DoCmd.OpenReport "YourReportname", acPreview
End Sub

When closing the report:

Sub Report_Close()
DoCmd.Close acForm, "YourFormName"
End Sub

It will not ask for parameters anymore.

Good luck
[pipe]
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
 
You guys are great. GDGarth confirmed what I thought, and Daniel, you are the man. That definitely worked. Makes sense... Do you ever read a tip and think.. Darn, why didn't i think of that. Well I did, and my answer is because i'm an idiot and you guys are geeenyuses.


Thanks!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top