I am curious if there is a way to set a variable to an object type in Access by the name of the form or report object.
For example, if I have a form named "frmSwitchboard", is there a way to set a variable to this by using the actual form name?
A simplified example...
May not be possible, but thought I'd ask.
For example, if I have a form named "frmSwitchboard", is there a way to set a variable to this by using the actual form name?
A simplified example...
Code:
Private Sub OpenSwitchboard()
Call OpenMyForm "frmSwitchboard"
End Sub
Private Sub OpenMyForm(fName as string)
Dim frm as Form
Set frm = New Form(fName)
frm.Visible = True
End Sub
May not be possible, but thought I'd ask.