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

Pass parameter for ADP without prompt.

Status
Not open for further replies.

GShen

MIS
Sep 26, 2002
561
US
I have report which has an input parameter for the user to enter for a particular stored procedure. It works fine. At the end of the day I have 4 of these reports I want to execute in automated mode. I know what the parameters are going to be,I just want to fire off 4 docmd.openreport commands without operator intervention.

Is there a way of bypassing the INPUT PARAMETER code in VB or do I just have to create another report and have it call another stored procedure without the parameters? I didn't want to start creating extra reports and stored procedures.

My INPUT PARAMETER looks something like this
@Date =[Enter in Date or Press 'Enter' for Today], the stored procedure has a parm @Date which drives the WHERE condition.
 
You can set the recordsource of the report in code, in one of the first events (onLoad, I think), but only if it is not a subreport. So you could set a global variable, read it in the event and use a query based on that variable. It is not a nice way of programming, but it is the only way to pass a parameter to a report, as far as I know.

Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top