ClaraBarton
Registered User.
- Local time
- Today, 08:23
- Joined
- Oct 14, 2019
- Messages
- 584
I want to pass the name of my form to the report it's calling. The calling button is on the 2nd sub form.
So I've tried
Me.Parent.Parent.Form.Name
Dim frm as Form
Set frm as Forms!frmAAAA
OpenArgs = Me.Name
the following:
None of these work. How do I do this?
So I've tried
Me.Parent.Parent.Form.Name
Dim frm as Form
Set frm as Forms!frmAAAA
OpenArgs = Me.Name
the following:
Code:
Dim frm As String
frm = "Forms!frmAAAA"
Me.Requery
DoCmd.OpenReport _
ReportName:="rptInvoice", _
View:=acViewPreview, _
WhereCondition:="InvoiceID = " & Me!InvoiceID, _
OpenArgs:=frm
Debug.Print OpenArgs
Forms!frmAAAA.Visible = False