In my form I have a print button, which runs:
Private Sub cmd_Print_Click()
Dim strReportArgs As String
strReportArgs = Forms!TabsReport!Top10_BU.Form.RecordSource
MsgBox (strReportArgs)
DoCmd.OpenReport "Top10Report", acViewNormal, , , , strReportArgs
End Sub
This displays a message box with the correct recordsource.
On the report loading I have:
Private Sub Report_Open(Cancel As Integer)
MsgBox ("HERE")
MsgBox (Me.OpenArgs)
End Sub
This throws up a null error on the Me.OpenArgs line every time but I cannot work out why ?
Private Sub cmd_Print_Click()
Dim strReportArgs As String
strReportArgs = Forms!TabsReport!Top10_BU.Form.RecordSource
MsgBox (strReportArgs)
DoCmd.OpenReport "Top10Report", acViewNormal, , , , strReportArgs
End Sub
This displays a message box with the correct recordsource.
On the report loading I have:
Private Sub Report_Open(Cancel As Integer)
MsgBox ("HERE")
MsgBox (Me.OpenArgs)
End Sub
This throws up a null error on the Me.OpenArgs line every time but I cannot work out why ?