Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2009
    Posts
    2

    Unanswered: Using the Tab key to leave a subform

    What code can I use to force the Tab key to leave a subform and move to the next field in the main form? What keywords should I look for help with? Any advice is greatly appreciated.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    AutoKeys?

    It shouldn't be TAB though; the TAB key is meant to go to the next logical field in the current [sub]form. Making it do something different is ... making me cringe.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Search for ASCII keys

    ex: if ASCII = {tab} then....

    You'd need to use this code in the correct event on the form (I can't recall which event worked best.)

    I agree with ST though that it should be something other than the tab key.
    Last edited by pkstormy; 06-26-09 at 01:02.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Of course, yes, you could trap the keystroke with the On Key Press event procedure, but that does have an impact on performance.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Jun 2009
    Posts
    2
    Thanks for all replies and advice. I think we will just tell our users to click in the next field - simpler for everyone!

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yup. Users should be able to cope with that
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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