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

Passing parameters to subqueries 1

Status
Not open for further replies.

patyavila

Technical User
Apr 29, 2004
28
US
The Data for the report comes from a query that selects from 8 different queries + one table. The 8 queries select the orders for each different Distributor Center for a certain date ([date] in criteria for each query), so whenever I run the report the user is asked to enter the parameter [date].
The order dates are restricted to certain Mondays, if the user enters a date in which there were no orders, a blank report is printed. To prevent this, I include a combo that selects the dates that actually are the orders table records, so the user just need to pick-up a date to report and won't need to "know" or "guess" the set of valid dates.
I run the report with

DoCmd.OpenReport , , , "[date] = " & vardate

But it only works for sending a parameter to the first query, not for the nested ones (the same happened with openargs)

Tried setting the date criteria in the final query, but the quantity of records resulted excesive and Access couldn't handle it [sadeyes] Does anybody has a good idea to try or has experienced this and know how to make it work? I'll appreciate any colaboration.

Thanx
 
instead of using parameters on these queries, can you not set them to a control on a form?

i.e. "... where tbl.dte = #forms!frmName!tbxName#;"

--------------------
Procrastinate Now!
 
[morning]
I was so immersed in the idea to solve the parameters passing that i literally forget there are more than one way to solve a problem.

Thank you!
[2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top