Solved

How to handle taborder with an SSTab object.

Posted on 2001-08-10
4
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…
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…

690 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