How do I show a OpenArg in a Report.
How do I show a OpenArg in a Report.
What have you tried so far?
On your form you can use some code like this:
Private Sub cmdPreview_Click()
Dim strArg As String
strArg = Me.payorname
DoCmd.OpenReport "rptEmployers", acViewPreview, , , , strArg
End Sub
Then on the report, create a label to hold your Arg string and add code like this to the open event:
Private Sub Report_Open(Cancel As Integer)
Dim strArgs As String
strArgs = Me.OpenArgs
Me.lblArgs.Caption = strArgs
End Sub