Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Tabbing back to form header (2000 & XP)

    I'm setting up a DB to help run a fund-raiser auction. At the end of the event, I'll have 3-4 volunteers sitting at laptop computers. These volunteers will each have a stack of "bid sheets." Those bit sheets have three important bits of information that these volunteers will enter into the DB. There's the item number (for the item up for auction), the bidder number for the person who placed the highest bid for the item, and the amount of that bid. The volunteers will use a form I've built to record that information, which will eventually find its way onto receipts when the bidders lay cash on the table. I want to make this data entry process as easy and painless as possible. I'm quite sure the volunteers will be unfamiliar with Access, so I don't want them to have to "figure out" how to do stuff.

    The form in question has a record selector combo box in the form header. The user clicks in the cbo and enters the value for the record they want to update. When they press Enter, the cursor moves to the first of two empty text boxes waiting for new data. The user enters the "Winning Bidder's" number in the first text box, tabs to the next box and enters the amount of the winning bid.

    Once the winning bid text box is populated, I would like the user to just tab back to the record selector cbo. (Or perhaps better: Press Enter to return to the record selector box.) I can't make this happen with tab order--it will let me set tab order in either the form header or in the detail section, but not between the sections. Certainly there's a way to do this...isn't there?

    I'll also be grateful for any tips and suggestions anyone might have for improving a form such as this. Many members of this forum have already contributed to this effort, and they will no doubt recognize the project I'm working on! (HansV, Shane, Wendell--thanks to you all!)

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

    Re: Tabbing back to form header (2000 & XP)

    A simple solution would be to move the combo box into the detail section. Then you can set the tab order.

    Alternatively, you could set the focus back to the combo box in the OnExit event of the second text box. Something like

    Private Sub txtAmount_Exit(Cancel As Integer)
    cbo.SetFocus
    End Sub

    where txtAmount is the name of the second text box, and cbo is the name of the combo box. Replace by the names on your form.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Tabbing back to form header (2000 & XP)

    Another solution is to put a transparent command button on the form with a TabOrder # immediately after the last textbox. Therefor, when user enters info into the last textbox and then tabs, focus moves to this command button. Then put code in the command buttons OnEnter event to move focus to the combo box in the header. I prefer this method to putting any code in the OnExit event of the last textbox.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Tabbing back to form header (2000 & XP)

    I chose (wisely, I think) the "simple solution." Somewhere I got the notion that the selector cbo needed to be in the form header. Guess not....

    Thanks again, Hans!

Posting Permissions

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