[AccessD] AXP ADP Report setting Recordsource to Stored Proc and passing parameters via code

jeffrey.demulling at usbank.com jeffrey.demulling at usbank.com
Wed Mar 26 16:52:12 CST 2003


One more question.  How can I get the code below to work so that I can set 
the recordsource of the report to the referened stored proc and pass it 
the parameters that are required?

Option Compare Database

Private Sub Report_Close()
Forms![frmReportsWeeklyRevenue].Visible = True
End Sub

Private Sub Report_Open(Cancel As Integer)
Dim mystartdate As Date
Dim myenddate As Date

mystartdate = 
FirstofMonth([Forms]![frmReportsWeeklyRevenue]![txtFromDate])
myenddate = 
CFMReportEndDate([Forms]![frmReportsWeeklyRevenue]![txtFromDate])

Me.RecordSource = "dbo.SEL_qryClosedMTD"
Me.InputParameters = "@stardate=" & mystartdate & ", @enddate=" & myendate


varReportName = "rptWeeklyRevenueClosedMTD"
varDisplayName = "Weekly Revenue - Closed Month to Date"


DoCmd.Maximize
End Sub

TIA
-Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030326/f135ef34/attachment.html>


More information about the AccessD mailing list