Martin Thorpe
July 26th, 1999, 10:00 AM
In MS Access the Open form statement takes a string as the name of the form. In VB6/SQL server I have a list in a listbox of the names of many crystal report files.
When one is picked, the chosen name is placed in the ReportFileName property of the crystal control. The name is then used to check a table of reports on SQLsrvr to
see if it needs parameters before running the report, and if so, I want to be able to open a 'dlgformname' to get them, where formname is the same name as was chosen
from the list. However, there seems to be no way to assign a form object reference to a form object variable using just the string name of the form somehow to resolve
the object expression to the form class. Am I missing something? Ideally it would be functionally like:
Dim genericform as Form
Set genericform = New 'formname' where formname is a string variable
genericform.show
Is there any way to do this using a string variable containing the name of a form?
When one is picked, the chosen name is placed in the ReportFileName property of the crystal control. The name is then used to check a table of reports on SQLsrvr to
see if it needs parameters before running the report, and if so, I want to be able to open a 'dlgformname' to get them, where formname is the same name as was chosen
from the list. However, there seems to be no way to assign a form object reference to a form object variable using just the string name of the form somehow to resolve
the object expression to the form class. Am I missing something? Ideally it would be functionally like:
Dim genericform as Form
Set genericform = New 'formname' where formname is a string variable
genericform.show
Is there any way to do this using a string variable containing the name of a form?