Here is the problem. I want to pass an object name to another form, then have that form instantiate the object. I have no idea how.
I tried unsuccessfully, to add a new Property to the form and then use that property name, but that does not work.
Here is what I tried:
In the Calling Form:
frmviewer.ReportName = "crBatchSummaryReport"
In the Called Form:
Private CRDesigner as String
Public Property Let ReportName(InputName As String)
CRDesigner = InputName
End Property
Public Property Get ReportName() As String
ReportName = CRDesigner
End Property
Then in the load event I tried:
Dim crReport as ReportName
Set crReport = New ReportName
This of course errors out, because it is using "ReportName" to define the object, but I want to use the value of "ReportName" which is "crBatchSummaryReport". I find a lot of places where I want to do this, but how do you get VB to use the Value of the string variable and not the variable name itself?
Thanks,
GW Gross
"You are blessed when you're content with just who you are - no more, no less." Matthew 5:5 (The Message)