Solved

open sub form when command button is clicked

Posted on 2013-11-25
2
2,409 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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 …

705 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now