Solved

Setting Focus to a tab on Form Activate

Posted on 2004-09-29
9
475 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

821 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