[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

On click, open a form in an specific tab page

Posted on 2009-04-28
8
Medium Priority
?
258 Views
Last Modified: 2013-11-28
Hi Guys

How can i create this event, on click, open X form on page=2.
i have a tab control with 5 pages in the form x.

best regards
0
Comment
Question by:titorober23
  • 5
  • 3
8 Comments
 
LVL 7

Accepted Solution

by:
coffeeshop earned 750 total points
ID: 24255128
Set dummy-forms to your tab control at all pages. Set them invisible. Show them on click. You can exchange the subforms with other you need at that moment. Let me know if you need help with this.
0
 
LVL 7

Assisted Solution

by:coffeeshop
coffeeshop earned 750 total points
ID: 24255154
0
 

Author Comment

by:titorober23
ID: 24255271
in every tab i have a subform, so what you mean is on click Open subform
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 7

Assisted Solution

by:coffeeshop
coffeeshop earned 750 total points
ID: 24255505
To clarify: you don't want to change the subforms in your tab control, you only want to open a form and switch to a specific tab?

Just add the following to the Form_Open Event

Me.YourTabCtrl = YourPageIndex

0
 

Author Comment

by:titorober23
ID: 24259521
I have a button in a different form, what i need is when they click in that button open another form in an specific page of a tab control
0
 
LVL 7

Assisted Solution

by:coffeeshop
coffeeshop earned 750 total points
ID: 24259713
Do you want to open a form that already contains a tab control, and show a specific page of this tab control?

or

Do you want to open a form at a specific page of an existing tab control of your already open form?

Please apologise my inconvenience, but I didn't get that...
0
 

Author Comment

by:titorober23
ID: 24263822
this is a switchboardm when a user click one button it should open a form, acccording to the button when they open a form one of the pages in the tab  control should has the focus
0
 
LVL 7

Assisted Solution

by:coffeeshop
coffeeshop earned 750 total points
ID: 24268763
OK, so my above comment gets you there, here is the complete code:

1) For the Button

Private Sub btOpenFormWithTab_Click()

  'exchange the 1 with the page you want to show, normally starting with Index 0
  DoCmd.OpenForm "frmWithTab", , , , , , 1
 
End Sub

2) For the Open-Event of the form you open:

Private Sub Form_Open(Cancel As Integer)

  'Change "YourTabCtrl" with the name of your tab-control
  If (Me.OpenArgs >= Me.YourTabCtrl.Pages(0).PageIndex) And _
     (Me.OpenArgs <= Me.YourTabCtrl.Pages(Me.YourTabCtrl.Pages.Count - 1).PageIndex) Then
    Me.YourTabCtrl = Me.OpenArgs
  End If

End Sub
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…
Suggested Courses

834 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