UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Option group and Tabbing    
 
   
mraetrudeaujr
post Apr 25 2008, 05:13 PM
Post #1

UtterAccess Guru
Posts: 820
From: Tennessee, USA



Is there a way to make my subform (or any other form, for that matter) tab through the "Option Group" controls/selections? ... and then out to the rest of the Form's controls?

You know; say you have the 'checkboxes' "YES" and "NO" within the option group. I would like it to tab to or through these selections...and then out to the rest of the Form's controls. Thanks.

Al T.
Go to the top of the page
 
+
Jack Cowley
post Apr 25 2008, 06:42 PM
Post #2

Retired Moderator
Posts: 37,716
From: The San Francisco Bay Area



If you are tabbing though how do you indicate which of the possible selections in the option group to select? Currently you have to click on the one you want using the mouse and you are good to go, but at the moment I cannot think of a way to tab through and still make a selection without using the mouse or another key press...

My 3 cents worth...

Jack
Go to the top of the page
 
+
mraetrudeaujr
post Apr 28 2008, 06:16 PM
Post #3

UtterAccess Guru
Posts: 820
From: Tennessee, USA



Yes, that's kind of what I thought...looking at the 'mechanics' of it.

I guess this is just part of my "learning curve" as I improve with Access. More thinking. More practicing, experimenting, etc...more 'why' questions.

Thanks, Jack

Al T.
Go to the top of the page
 
+
Jack Cowley
post Apr 28 2008, 06:18 PM
Post #4

Retired Moderator
Posts: 37,716
From: The San Francisco Bay Area



Al T.

You are most welcome! Glad to be of assistance and just keep plugging away!!!

Jack
Go to the top of the page
 
+
pere_de_chipstic...
post Apr 29 2008, 04:21 AM
Post #5

UtterAccess VIP
Posts: 7,646
From: South coast, England



I was asked to do a similar tab through option list and came up with this:
CODE
Private Sub Option16_KeyDown(KeyCode As Integer, Shift As Integer)

      If KeyCode = 9 Then

        If intOpt = Me![Frame11] Then

            Me![TextBox].SetFocus

        ElseIf Shift = 0 Then

            If intOpt = 0 Then intOpt = Me![Frame11]

            Me![Frame11] = 3

        Else

            Me![TextBox].SetFocus

        End If

    End If


The code was placed in the key down event of each option where Frame11 is the containing frame. The 'Me![Frame11] = 3' is amended so that the tab cycles round all option in the frame until the shift key is held when tabbed and then the focus then moves to the next control (here 'TextBox'),

If the tab has cycled round all values the control will also go to the next control (when intOpt = the initial value) intOpt is set to zero in the Frame11_Enter event. intOpt is defined as a private variable at the top of the code window:
CODE
Option Compare Database

Option Explicit

Private intOpt As Byte



Hope this helps (or maybe of some interest!)

Edited by: pere_de_chipstick on Tue Apr 29 5:28:26 EDT 2008.
Go to the top of the page
 
+
mraetrudeaujr
post Apr 29 2008, 09:59 AM
Post #6

UtterAccess Guru
Posts: 820
From: Tennessee, USA



Thanks Pere!

I'll try this out and see how it works. I kind of figured that all that was needed was some kind of 'event' trigger
--- with the right code, of course. Thanks again.

Al T.
Go to the top of the page
 
+
pere_de_chipstic...
post Apr 29 2008, 12:26 PM
Post #7

UtterAccess VIP
Posts: 7,646
From: South coast, England



You're welcome (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)

Hope the code gives you what you wanted.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 02:43 PM