Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box (Access2002)

    I have a form with a Combo Box; I would like the form to auto tab to next field after I entered a four digit value. All entries will be four digits. There is no AutoTab property on the Combo Box Properties.

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box (Access2002)

    If you're using a combo box, aren't the options limited? If so, in the after update event of the combo box you should be able to set the focus through VBA
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box (Access2002)

    I would recommend against doing that. The user has no chance to correct a mistake if the focus shifts immediately.

  4. #4
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box (Access2002)

    Just a suggestion, and the only way I know how. How else can you do it Hans?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box (Access2002)

    You could use the On Change event and check the length of the Text property, but this will cause problems if the user has entered a value that is not in the list (assuming that you want to allow only values from the list). So you'd have to check that the user has entered a valid entry too, something normally done by Access itself if the Limit to List property has been set to Yes. All in all, more trouble than it's worth.

  6. #6
    2 Star Lounger
    Join Date
    Jul 2003
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box (Access2002)

    Thanks for the recommendation; however I have limited their entries to the list. Therefore they can only enter valid values. I have set the after update property to set focus to the next field; but this VBA code will only activate after the tab or enter key have been depressed. I just want the tab to advance to the next field after the forth digit has been entered and the value is listed in the combo box list.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box (Access2002)

    See my reply to Jeremy.

  8. #8
    2 Star Lounger
    Join Date
    Jul 2003
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box (Access2002)

    So the best thing is to have the combo box "after update" property move the focus to the next field? So the individuals entry will need to depress the tab key or enter key; before the cursor moves to the next field. Thanks for your response; it is very much appreciated.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box (Access2002)

    You don't need code. When the user presses Enter or Tab, the focus will automatically shift to the next control in the tab order.

  10. #10
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo Box (Access2002)

    Hans,
    I completely agree, tab or enter are just as reachable on the keyboard as it is to move a mouse.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •