Results 1 to 5 of 5
  1. #1
    drow's Avatar
    drow is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    53

    Form Data Entry Events - Tab and Enter Event

    Hello All,



    I am trying to not make the database users despise me by automating some of the form data entry by controlling the sequence in which fields are entered so that it is in a logical order. I am trying to find an event that engages only if the user hits the TAB or ENTER keys to exit the current control and move to the next field they have to enter data into on the form. I have searched around on this forum for posts on this topic but it turns out that the words tab and enter are used quite frequently in other contexts.

    Currently I am using the macro builder and the GoToControl functionality to try and achieve the behavior I would like to accomplish. Is there a way to use an IF statement within the On Exit event to determine if the TAB or the ENTER key have been pressed? Alternatively, is there a specific event that captures the scenario where only the TAB or ENTER keys have been pressed? I feel like this should be a simple fix, but that I have just not found the correct resource.

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    You can set the order of the tab/enter using the TABindex property. Start with 0, and assign up.
    If you dont want the box to get selected, set TABSTOP = NO

  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
    Quote Originally Posted by drow View Post
    Hello All,

    I am trying to not make the database users despise me by automating some of the form data entry by controlling the sequence in which fields are entered so that it is in a logical order.
    Then why are you doing the one thing that is sure to make the users hate you??? In my experience, there is nothing more annoying to users than forcing them to enter data in a certain order!

    Doing so, when there is a specific need, i.e. before entering data in ControlB then ControlA must be populated, is one thing, but simply forcing them to follow what you consider to be logical progression is very likely not to be in line with their preferences, and very likely to assure that you won't be named Co-Worker of the Month!

    Linq ;0)>

  4. #4
    RonL is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Location
    NJ
    Posts
    114
    The merits of the other responses notwithstanding, OP may wish to check out the Keydown event:

    http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx

    -Ron

  5. #5
    drow's Avatar
    drow is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    53
    Thank you everyone for you responses. ranman, that is exactly what I was looking for - I was unaware of that functionality.

    Missinglinq, thanks for your comments. In general I agree with you which is why I didn't like the options that were available for the on exit as it forced the user to a, on key down etc events. Before the tab order was quite random, now it is some kind of logical order. Also, in the context I am using, with cascasding combo boxes, I feel that usage of the tab order is reasonable. That being said

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

Similar Threads

  1. Replies: 17
    Last Post: 11-05-2013, 06:55 PM
  2. Form Event On Enter
    By JeffGeorge in forum Forms
    Replies: 3
    Last Post: 10-10-2013, 02:14 PM
  3. Form Entry (Enter a quanity of record)
    By spartanx117 in forum Forms
    Replies: 3
    Last Post: 10-03-2013, 01:54 PM
  4. Field auto enter new line on enter event
    By Ruegen in forum Forms
    Replies: 3
    Last Post: 09-17-2013, 09:00 PM
  5. Replies: 1
    Last Post: 08-24-2012, 06:50 AM

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