|
-
Dec 11th, 2001, 12:09 PM
#1
Thread Starter
Lively Member
problem assigning form name to variable
Trying to read in a form name from Access table (working) and then load that form with code.
Here's the code:
Dim MyForm As Form
Set MyForm = rs1![Form] ' rs1![Form] = "frmA"
Load MyForm
MyForm.Show
Get a type mismatch error on the Set line...
Any ideas?
Thanks
Steve
vb6
-
Dec 11th, 2001, 12:41 PM
#2
You can't do that. To load a form you have to explicitly name the form.
Once a form exists, you can use a collection to reference the form, but until it exists (loads) you can't indirectly reference it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|