Solved

How to handle taborder with an SSTab object.

Posted on 2001-08-10
4
267 Views
Last Modified: 2008-03-10
I have a form that has an SSTab object on it.  When I set the taborder for all of the objects, the form includes all of the tabs. So when you get to the last visible object, and hit tab, the cursor disappers. It comes back after you tab through all of the other tabstops.

I guess the best solution would be if I could make the SStab move to the tab visible if one of the fields was tabbed to (lots of tab words, sorry).

I know I could simply make all of them not be tabstops. I don't like this solution because when the user switches tabs, you want the tab key to work.

Thoughts, or just to confusing a question?
0
Comment
Question by:jnhgustin
4 Comments
 
LVL 5

Expert Comment

by:KDivad
ID: 6375066
The closest I've ever been able to do is to set up your taborder as though you were going to let the user tab through every control on the form and then make the controls you want out of the order be disabled or hidden.
0
 
LVL 39

Expert Comment

by:appari
ID: 6375148
you can keep all the controls going on to one tab in to a frame and keep the frame on the respective tab and on tab change disable all other frames and enable the frame to be displayed on current tab.

0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6375246
appari is correct.  By disabling the frames not in use, you disable all of the controls within those frames...  The tabbing has to stay with the enabled controls on the current tab
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 100 total points
ID: 6375278
What I do in such situation to get the focus to the invisible control, is to set the SStab's tab property in the first and last control in the particular tab, something like this:

Say, SSTab1, Tab 1 has TextFirst as first control and TextLast as last control. Now, if the user presses TAB from previous tab's last control, then the focus will be to TextFirst and it will be visible. Similarly, if there is another Tab after Tab 1, and if user presses SHIFT+TAB from that control, then the focus will be shifted properly.

Private Sub TextFirst_GotFocus()
  if SSTab1.Tab <> 1 Then
      SSTab1.Tab = 1
  End If
End Sub

Private Sub TextLast_GotFocus()
  if SSTab1.Tab <> 1 Then
      SSTab1.Tab = 1
  End If
End Sub

I am not sure, if this is what you require.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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