Trying to execute a private procedure from another form 
Author Message
 Trying to execute a private procedure from another form

I have a form which contains a button to open a pop-up
form. When the pop-up form is closed it appends these
records to the subform on my primary form. I then requery
the subform. The next thing I would like to have happen is
to execute a private subroutine within the subform. I have
tried everything I know of. I can have the focus set to
the subform but still can't find a way to execute the
subroutine. The message I get from the Pop-up is
unidentified procedure. Any ideas would be greatly
appreciated.


Sat, 01 Oct 2005 00:14:51 GMT  
 Trying to execute a private procedure from another form
Remove the "Private" keyword from the subroutine's declaration.
You can then call it by referring to the module it belongs to.

For example to call the Click event procedure of a command button named
"DoThis" on a form named "MyForm":
    Call Form_MyForm.DoThis_Click

--
Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to the newsgroup. (Email address has spurious "_SpamTrap")


Quote:
> I have a form which contains a button to open a pop-up
> form. When the pop-up form is closed it appends these
> records to the subform on my primary form. I then requery
> the subform. The next thing I would like to have happen is
> to execute a private subroutine within the subform. I have
> tried everything I know of. I can have the focus set to
> the subform but still can't find a way to execute the
> subroutine. The message I get from the Pop-up is
> unidentified procedure. Any ideas would be greatly
> appreciated.



Sat, 01 Oct 2005 00:21:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Trying to execute as stored procedure

2. Unable to execute Oracle Procedure using Ado2.5 - using synonyms for procedures

3. Calling a Form's private method from another Form

4. Accessing Private Data of One Form in a Second Form

5. private and not private

6. Trying To Execute example

7. Does Finally execute try Catch throws an Exception?

8. Getting syntax error when trying to execute a stored proc

9. tried dts copy of tables stored procedures etc and it fails exery time

10. Last try for stored procedures/ODBC problem...

11. Closing a form with the ‘X’ Button does not destroy in stances of Private Variables

12. Accessing MDI Child Form Private Variables??

 

 
Powered by phpBB® Forum Software