Solved

Setting Focus to a tab on Form Activate

Posted on 2004-09-29
9
471 Views
Last Modified: 2008-01-09
How can I set the focus to a tab on a form on the activate command?  Thanks all
0
Comment
Question by:sbornstein2
9 Comments
 
LVL 8

Expert Comment

by:mladenovicz
Comment Utility
SSTab1.SetFocus
0
 
LVL 19

Expert Comment

by:Shauli
Comment Utility
If you refer to the SSTAB (Tabed Dialog) then:

Private Sub Form_Activate()
SSTab1.Tab = 1   'or any other number, The number is the tab number you want to set focus on.
End Sub

S
0
 

Author Comment

by:sbornstein2
Comment Utility
I am using VBA actually and I dont have the tab property.  I have a tab called MultiPage1 and the tab name is Page1.  My options under MultiPage1. are

pages
tabindex
etc.

I tried MultiPage1.TabIndex = 1 but no dice it still goes to another tab.
0
 
LVL 19

Expert Comment

by:Shauli
Comment Utility
I'm guessing here, but try:

Page1.Pages(1)

Where 1 is the tab number.

Let us know.

S
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 19

Expert Comment

by:Shauli
Comment Utility
Or maybe Page1.Pages = 1

But I'm unfamiliar with that vba tab.

S

0
 

Author Comment

by:sbornstein2
Comment Utility
No dice.
0
 
LVL 19

Expert Comment

by:Shauli
Comment Utility
In that case I suggest you ask for refund @ customer support, and replace the question, and this times specifying its VBA and Multipage control. :)

Good luck,

S
0
 
LVL 12

Accepted Solution

by:
jkaios earned 20 total points
Comment Utility
How about try these other combinations ...

MultiPage1(0).SetFocus
 - or -
MultiPage1.Pages(0).SetFocus
 - or -
MultiPage1.TabIndex = 0
 - or -
MultiPage1.TabIndex(0).SetFocus

Remember that some Collections start with Index = 0, usually "Controls" collections.
0
 

Author Comment

by:sbornstein2
Comment Utility
The answer is just .Value in VBA.  MultiPage.Value = 1
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

17 Experts available now in Live!

Get 1:1 Help Now