Solved

Setting Focus to a tab on Form Activate

Posted on 2004-09-29
9
472 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
ID: 12181937
SSTab1.SetFocus
0
 
LVL 19

Expert Comment

by:Shauli
ID: 12181950
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
ID: 12182614
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
ID: 12182636
I'm guessing here, but try:

Page1.Pages(1)

Where 1 is the tab number.

Let us know.

S
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 19

Expert Comment

by:Shauli
ID: 12182664
Or maybe Page1.Pages = 1

But I'm unfamiliar with that vba tab.

S

0
 

Author Comment

by:sbornstein2
ID: 12183701
No dice.
0
 
LVL 19

Expert Comment

by:Shauli
ID: 12183804
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
ID: 12187367
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
ID: 12190152
The answer is just .Value in VBA.  MultiPage.Value = 1
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

932 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

15 Experts available now in Live!

Get 1:1 Help Now