Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Forms Coding > Calling Click e...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 41494 of 43412
Post > Topic >>

Calling Click event of another form

by =?Utf-8?B?S2VuIFdhcnRoZW4=?= <KenWarthen@[EMAIL PROTECTED] Aug 4, 2008 at 01:38 PM

I have an Access 2007 application in which I'm creating a custom ribbon.  I

have a callback module in which there is a routine called onOpenForm. 
Within 
the routine there is a select case statement where code is executed based
on 
the calling ribbon button.  I'm having trouble with one of Case statements

where I need to both open a form and call the click event of a command
button 
on the form.  Here is the relevant code:

        Case "btnEnterProject"
            If (CurrentProject.AllForms("frmProjects").IsLoaded) Then
                Forms!frmProjects.SetFocus
                Forms!frmProjects.cmdAddProject_Click
            Else
                DoCmd.OpenForm "frmProjects", acNormal
                Forms!frmProjects.SetFocus
                Forms!frmProjects.cmdAddProject_Click
            End If

When I run the code I get an error message #2465, "Application-defined or 
object-defined error."  If anyone can tell me what I'm doing wrong here, I

would be very appreciative.

Ken
 




 4 Posts in Topic:
Calling Click event of another form
=?Utf-8?B?S2VuIFdhcnRoZW4  2008-08-04 13:38:16 
Re: Calling Click event of another form
"bcap" <bcap  2008-08-04 22:11:15 
Re: Calling Click event of another form
=?Utf-8?B?S2VuIFdhcnRoZW4  2008-08-04 14:55:00 
RE: Calling Click event of another form
=?Utf-8?B?U3RldmU=?= <  2008-08-04 14:17:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 19:51:33 CST 2008.