?
Solved

open sub form when command button is clicked

Posted on 2013-11-25
2
Medium Priority
?
2,821 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

764 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