|
-
Mar 27th, 2008, 10:55 AM
#1
Thread Starter
Lively Member
Access VBA: String to Object Question.
Hello, I have a question concerning pasing an argument in the form of a string then converting that string into an object part.
THis question is concerning Acess 2003 and VBA.
Setup:
Form 1 named: frmMyform
in the VBA code on this form i call a function in a Module.
dim formName as string
formName = Me.Name (thus setting formName to "frmMyform")
Function call: myfunction (formName)
------------------------------------
In module i now have the function that recieves the name...
I wish to use the name in the following manner...
dim frm as form
set frm = Forms!formName <------------- Notice how i use the passed variable "formName"... Access tosses an error about it being a string and not part of the object command.
I need to convert the string into the apropriate object type to turn it into a form.
any help would be apreciated.
VB.Net uber-noob since04, Yeababy! 
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
|