By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,968 Members | 1,295 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,968 IT Pros & Developers. It's quick & easy.

Trigger On Click Event of a button from another form.

P: n/a
Hi
I would like to be able to trigger the "on click event" of a button
from the code within a different form. Does anyone know if this is
possible and if so how.

TIA
Andrew
Feb 6 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Wed, 6 Feb 2008 10:42:59 -0800 (PST), An****@2bsystems.co.uk wrote:
Hi
I would like to be able to trigger the "on click event" of a button
from the code within a different form. Does anyone know if this is
possible and if so how.

TIA

Andrew
First make sure the sub procedure is set to Public (not Private).

To call it from another form:
Call Forms("NameOfForm").CommandName_Click

Both forms must be open.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 6 '08 #2

P: n/a
On 6 Feb, 21:19, fredg <fgutk...@example.invalidwrote:
On Wed, 6 Feb 2008 10:42:59 -0800 (PST), And...@2bsystems.co.uk wrote:
Hi
I would like to be able totriggerthe "onclickevent" of a button
from the code within a different form. Does anyone know if this is
possible and if so how.
TIA
Andrew

First make sure the sub procedure is set to Public (not Private).

To call it from another form:
Call Forms("NameOfForm").CommandName_Click

Both forms must be open.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Hi Fred
Thanks you for that, it works on 2 separate forms, however one of my
forms requires me to trigger it on a sub form, I have tried the
obvious which fails:

forms!frm1!frm1_Sub.event

TIA
Andrew
do you know how to
Feb 7 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.