P
Peter Brase
I have a form with a subform. I have a class module
containing properties and methods used by the parent form
and instantiated when the parent form is loaded. I want
to be able to access a method in the class module from a
control on the subform. According to the help file's
discussion of the Module Object, this should be possible.
The help file says:
Dim mdl As Module
Set mdl = Forms!Employees.Module
Once you've returned a reference to a Module object, you
can set or read its properties and apply its methods.
It says quite clearly: "you can apply its methods". But
how? I created the mdl variable, but how exactly do you
reference the method? I have tried all the obvious forms
of Access syntax to run a function or a procedure
(e.g., "Call mdl.MyFunctionName", etc.), but Access
invariably tells me that the "data member or method cannot
be found". Can anyone shed light on this question? I
have the same problem when trying to get or set properties.
Thank you!
containing properties and methods used by the parent form
and instantiated when the parent form is loaded. I want
to be able to access a method in the class module from a
control on the subform. According to the help file's
discussion of the Module Object, this should be possible.
The help file says:
Dim mdl As Module
Set mdl = Forms!Employees.Module
Once you've returned a reference to a Module object, you
can set or read its properties and apply its methods.
It says quite clearly: "you can apply its methods". But
how? I created the mdl variable, but how exactly do you
reference the method? I have tried all the obvious forms
of Access syntax to run a function or a procedure
(e.g., "Call mdl.MyFunctionName", etc.), but Access
invariably tells me that the "data member or method cannot
be found". Can anyone shed light on this question? I
have the same problem when trying to get or set properties.
Thank you!