The code I have entered for a picture click event inserted in a
switchboard
menu is the following:
------------------------------
Private Sub imgAssociateInfo_Click()
DoCmd.OpenForm "frmAssociates", acNormal, , , acAdd
End Sub
------------------------------
This has been put in Form_fmnuMain of Microsoft Office Access Class
Objects.
The message I get when I click on the image is:
------------------------------
"The expression On Click you entered as the event property setting
produced
the following error: A problem occurred while Microsoft Office Access was
communicating with the OLE server or ActiveX Control.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evalusting the function, event, or macro."
------------------------------
I have also created the code using the Wizard to make sure I haven't made
a
typo and it still doesn't work. I am using Microsoft Access 2003.
I have been using other databases that has similar code to open forms and
they are working perfectly.
I'm at a loss!
Thanks for any help you'll give me.
Al Campagna said:
Gaetan,
What do you mean by "would not work?" Any error message? What
does/doesn't happen?
Also, we need to see your code, exactly as you enetered it.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
Would any of you know why a DoCmd.OpenForm VB command would not work?
Is
there any kind of settings I need to do so that it works? Any such
command
I
insert into my code does not work, even why I do it with the Wizard!
Please help!
Thanks.