
How to load form using form name from field
We had a similar problem back in the good old VB3 days. All we could do
then was have a big select case like
select case strFormName
case "Form1"
Form1.show
etc.
You could load all your forms in a collection and set the key to be the
form name then you could access show it with:
colForms(strFormName).show
But you would still have to previously load all the forms into the
collection by
colForms.add form1
colForms.add form2
etc.
Good luck
--
Shawn
--
http://www.cris.com/~shawnlee/ Borg Pursuit Screen Saver for Windoz
Quote:
> : how can i load a form using the form's name from a field in a table,
> : ie. using: 'Data1.Recordset![Form Name]'?
> maybe i should rephrase: how can i load forms using their names that i
> have stored as strings in a database table?
> i've tried stuff like: Data1.Recordset![Form Name].Show and
> Dim myform as Form
> set myform = Data1.Recordset![Form Name]
> myform.Show
> ...no luck.
> i realize that the values i'm getting back from the table are of type
> 'String' but i have no idea how to cast it to be of type 'Form' so that i
> can load the form which has a name property equal to the extracted value.
> please help, thanks a lot in advance.
> --
> * REDUCE, REUSE, RECYCLE *