• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3043
  • Last Modified:

open sub form when command button is clicked

Hi Experts

How would you write the vba to open a sub form called mac_2 when command button, cmdsubform is clicked. .m
0
route217
Asked:
route217
1 Solution
 
mbizupCommented:
Do you mean:

1.  A true subform that is embedded in your main form

OR

2.  A separate popup form

?


If 1 (a true, embedded subform), then you don't need to "open" a subform.  You can set it's visible property to false in your main form's design, and then in the command button click event:

Me.[mac_2].Visible = true

if 2 (a separate popup) then:

Docmd.OpenForm "mac_2"
0
 
route217Author Commented:
Excellent two positive thing learnt...

Thanks for the feedback.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now