Results 1 to 4 of 4
  1. #1
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051

    Tab button to jump to empty fields only

    I have a continuous form with six controls (approx. 28 rows)




    text1, text2, text3, empty, empty2,empty3

    I'd like to be able to click on the first empty cell and then when the tab button is pressed, it jumps to the next empty cell.

    Happy to use vba but am looking for an idea to get me started

    Many thanks

    Andy

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    tab order is a set form property. And then each field/control has a Tab Stop property (yes/no).

    In the On Current event (which triggers when you first put your cursor into the record) - you would need a stack of vba code, 1 line per control, that resets their Tab Stop property based upon there being a value in their field.

    You cannot defy the form's tab order fundamentally but you could skip over fields with values.

    there could be a conflict with the 1st control on attempting to change its Tab Stop property while it is the In Focus control - such that you might need a faux 1st field just to hold the cursor temporarily - an off the cuff thought.....

  3. #3
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    You can trap for the tab key if KeyPreview is enabled for the form. Don't know if you can suppress cursor move if control tab stop property is true. If not, maybe set to false and use sequenced control tag values to cycle through them until an empty one is found.
    Last edited by Micron; 01-26-2017 at 10:55 AM. Reason: Spelin
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051

    Tab button to jump to empty fields only

    This was actually much easier than I hoped.

    https://support.office.com/en-gb/art...7-c1785a0dd438


    Thanks for your input.


    Sent from my iPhone using Tapatalk

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

Similar Threads

  1. Replies: 9
    Last Post: 10-06-2014, 02:02 PM
  2. Query Three Fields One can be Empty
    By bgold01 in forum Queries
    Replies: 2
    Last Post: 04-16-2013, 10:50 AM
  3. Replies: 2
    Last Post: 04-23-2012, 10:13 PM
  4. Replies: 4
    Last Post: 03-01-2012, 08:15 PM
  5. Replies: 4
    Last Post: 11-20-2011, 01:08 PM

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