Results 1 to 3 of 3
  1. #1
    lurch177 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    2

    Moving Focus From Radio Button After Selected

    Hello,



    I have a form with two radio buttons in an option group, a combo box, and several text fields. The selected radio button together with the data typed or selected in the combo box drop down are used to create a query to populate some of the text fields elsewhere in the form.

    When the form is opened, a default radio button is selected, and focus is on the combo box where the user enters the first data. The problem I'm trying to solve is that, when the user selects the 2nd radio button, focus remains there, and they have to click or tab to the combo box to continue data entry. I would like to programatically move focus back to the combo box when the other radio button is selected so that they can continue from there.

    Should be simple, I though, but can't figure out how to do that. Using SetFocus to move focus back to the combo box when either radio button is clicked (OnGotFocus) doesn't work.

    Any thoughts/help appreciated.

    Thanks

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    I think the code to set the focus to the combo box should be in the After Update event of the option group.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    lurch177 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    2
    Quote Originally Posted by Bob Fitz View Post
    I think the code to set the focus to the combo box should be in the After Update event of the option group.
    That did the trick. Never occurred to me to put the code there. Thanks for your help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. radio button and checkbox
    By Fifa in forum Access
    Replies: 2
    Last Post: 01-19-2011, 10:20 AM
  2. CMD Button shows a 2nd dotted focus box
    By mapline in forum Forms
    Replies: 1
    Last Post: 12-02-2010, 05:19 PM
  3. Radio Button Select in WebBrowser
    By access_man in forum Access
    Replies: 3
    Last Post: 10-27-2010, 05:29 PM
  4. Replies: 13
    Last Post: 07-26-2010, 03:38 PM
  5. Select Radio Button and another one turns off
    By Lockrin in forum Programming
    Replies: 1
    Last Post: 02-09-2010, 02:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums