Results 1 to 6 of 6
  1. #1
    janbrown56's Avatar
    janbrown56 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    18

    Tab to next field after checkbox clicked

    I have a form that where users will select the parts that they need labels for. There are lines of available parts to select from and a checkbox for them to click on to select their parts. If a part is selected then a carton quantity field must be entered. I set validation rules on the table to make sure that both are done but I would like to automatically put the focus in the carton quantity field after they select a part. I have not been able to figure out how to do this. I know it would be some event OnClick but I don't know how to set it up. All the fields are locked except for the checkbox and the carton quantity field. I have set the tab order so the checkbox is the first tab field and the carton quantity is the next field.



    Do you have any suggestions?

    Thank you for your time.

    Jan Schmitt

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Try the after update event of the checkbox, using SetFocus.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Something like this, substituting your actual Control names:

    Code:
    Private Sub CheckboxName_AfterUpdate()
     If Me.CheckboxName = -1 Then
      Me.CartonQuantityTextbox.SetFocus
     End If
    End Sub

    If the user ticks the Checkbox, realizes a mistake has been made, and unticks it, the Focus will not go to the Carton Quantity Textbox.

    Linq ;0)>

  4. #4
    trevor40's Avatar
    trevor40 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    407
    In the form design you can set the TAB order tbe whatever you need.

    no code required.

    1000 ways to skin a cat, allways looking for another one...
    Use MDB format for sample post. If your issue is fixed, mark the thread solved.
    Click on the star below if this has helped.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Quote Originally Posted by trevor40 View Post
    In the form design you can set the TAB order tbe whatever you need.

    no code required.
    Clicking on a checkbox will not trigger this.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Demerit's Avatar
    Demerit is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    125
    You can only do that with a macro or with VBA but i recomend VBA. Just as explained by Missinglinq

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

Similar Threads

  1. Replies: 1
    Last Post: 11-26-2014, 02:30 PM
  2. Replies: 1
    Last Post: 08-07-2013, 11:31 AM
  3. Replies: 1
    Last Post: 06-24-2013, 07:50 AM
  4. Using A Checkbox For A Text Field
    By LanieB in forum Forms
    Replies: 1
    Last Post: 04-12-2013, 06:18 AM
  5. Autonumbering when a checkbox is clicked?
    By kutehart in forum Forms
    Replies: 1
    Last Post: 08-02-2010, 09:03 AM

Tags for this Thread

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