eurob
Mar 10 2005, 12:05 PM
I have a form and I would like to pass this form to a procedure in a module.
Dim frmObject As Form
Set frmObject = Me
UpdateFields (frmObject) <---------- What is wrong with this call ?
Public Sub UpdateFields(frmObject As Form)
MsgBox frmObject.Name
End Sub
I get a 'runtime error 13, Type Mismatch'.
Appreciate some help.
robert
eurob
Mar 10 2005, 12:09 PM
I got it.
I need to change the call UpdateFields (frmObject) to
UpdateFields frmObject
without the brackets.
MicroE
Mar 10 2005, 12:15 PM
FYI – you do not need to declare the frmObject – it is an argument in your Procedure.
Instead of:
Dim frmObject As Form
Set frmObject = Me
UpdateFields frmObject
You can simply code:
UpdateFields Me
eurob
Mar 11 2005, 10:25 AM
cool, thanks
MicroE
Mar 11 2005, 11:06 AM
You're Welcome
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.