Please correct this statement

Mansoor Ahmad

Registered User.
Local time
Today, 22:14
Joined
Jan 20, 2003
Messages
140
Dear All

It may be a very dump question but I can't get my head around it.

I have a MainForm and then a subform Form1 on it.

There is a command button cmd1 on subform Form1. Now I want to access cmd1 through another command button cmd2 on a different form Form2. How would I design the statement?

I have tried the followings on OnClick event of cmd2 on Form2

Forms!MainForm.Form1.cmd1.visible = true

Forms!MainForm.cmd1.visible=true

Forms!Form1.cmd1.visible=true

Forms!MainForm.Subform.Form1.cmd1.visible=true

Nothing works. Any suggestions?

Thank you

:confused: :confused:
 
Last edited:
Try:


Forms!MainForm!Form1.Form!cmd1.visible = true
 
Bang on target ;)

Thank you very much Koci

and also thanks to maxmangion for the link to a very useful thread

:) :) :)
 

Users who are viewing this thread

Back
Top Bottom