SBendBuckeye
Programmer
In Class_Initialize procedure I have the following code:
Dim mdl As Module
DoCmd.RunCommand acCmdNewObjectModule
Set mdl = Modules(0)
mdl.AddFromString "Public Sub Misc(), etc. End Sub"
As long as I do NOT execute the mdl.AddFromString line, everything is OK. I can find my class embedded in the ME object, etc when the code returns.
BUT, if I execute the mdl.AddFromString line it works as the new procedure shows up in the standard module, however when the code returns, the class object embedded within ME now shows up as Nothing.
How is the above code impacting the class object like this? Thoughts anyone?
Thanks in advance for any help you can give me!
Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need!![[thumbsup] [thumbsup] [thumbsup]](/data/assets/smilies/thumbsup.gif)
Dim mdl As Module
DoCmd.RunCommand acCmdNewObjectModule
Set mdl = Modules(0)
mdl.AddFromString "Public Sub Misc(), etc. End Sub"
As long as I do NOT execute the mdl.AddFromString line, everything is OK. I can find my class embedded in the ME object, etc when the code returns.
BUT, if I execute the mdl.AddFromString line it works as the new procedure shows up in the standard module, however when the code returns, the class object embedded within ME now shows up as Nothing.
How is the above code impacting the class object like this? Thoughts anyone?
Thanks in advance for any help you can give me!
Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need!
![[thumbsup] [thumbsup] [thumbsup]](/data/assets/smilies/thumbsup.gif)