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

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
Last edited: