Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Toggle Tabbing Off and On

Toggle Tabbing Off and On

Toggle Tabbing Off and On

I have a form with several fields which I would like the users to be able to easily toggle back and forth as to whether they want to automatically tab there or not during the data entry, without having to go into design mode to change the settings. Can I do this with controls on the form somehow?

RE: Toggle Tabbing Off and On

If I understand you, the action you need to accomplish is only restricted to this form. Lets say you have 10 fields on the form, 6 of them are the most common ones to deal with. The other 4 only get used in certain instances. I use this approach in one of my forms. The user hits ( Alt+M ) if they need to get into the other 4 fields. By using the form Key Down Event I trap the Alt+M key strokes and use code to set the TabStop property to True for the fields you want to enable tabbing into. The form current event is used to turn off this feature.

Private Sub Form_Current()
    Me.YourFieldName.TabStop = False
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    'trap the hot keys for extended form field access
    If KeyCode = 77 And Shift = acAltMask Then
        Me.YourFieldName.TabStop = True
    End If
End Sub

John A. Gilman

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close