Solved

open sub form when command button is clicked

Posted on 2013-11-25
2
2,556 Views
Last Modified: 2013-11-25
Hi Experts

How would you write the vba to open a sub form called mac_2 when command button, cmdsubform is clicked. .m
0
Comment
Question by:route217
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39674886
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
 

Author Comment

by:route217
ID: 39674925
Excellent two positive thing learnt...

Thanks for the feedback.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question