Need help with running code

G

Guest

How can I run a code behind a command button on form1 from form2 while form1
is in the background?
thanks
Al
 
J

Jeff Boyce

Al

Could you describe what you are trying to accomplish in a bit more detail?
You've described HOW you are trying to do something, but not what that is...
There may be other ways to get the same job done...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
F

fredg

How can I run a code behind a command button on form1 from form2 while form1
is in the background?
thanks
Al

Call Forms("Form1").CommandName_Click

Where Form1 is the acual name of the form and CommandName_Click is the
actual name of the sub procedure.
Both forms must be open.
 
V

Van T. Dinh

Fred

I think the CommandName_Click Event Procedure declaration need to be changed
to Public rather than the normal Private???
 
D

Douglas J. Steele

That's correct, Van.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Van T. Dinh said:
Fred

I think the CommandName_Click Event Procedure declaration need to be
changed to Public rather than the normal Private???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top