Results 1 to 5 of 5
  1. #1
    Deutz is offline Advanced Beginner
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    51

    Set tab index of controls on tab

    Hi and thanks in advance,

    I have an Access 2003 db with a form that has a Tab control and some unbound textboxes on each tab.

    When the user presses the Tab or Arrow keys I want to set the tab order of all the unbound textboxes on a tab so that the user can navigate the form horizontally or vertically like a spreadsheet.



    I inititally thought to capture the key pressed and simply set focus to the appropriate textbox but that caused the controls on the tab to flicker. I posted a thread on this but got no response.

    The problem with resetting the tab order via VBA is that once four or five textboxes are set, they then start to renumber randomly and do not keep the tab order I set.

    I tried ordering the tab index of each textbox from zero upwards and also from the max index downwards but I end up with the same problem.


    Thanks
    Deutz

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Access tables and forms are not like Excel spreadsheets. I think you will go nuts trying to manage this in code. My recommendation is that you set a tab order for the form and the users just get used to it.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Deutz is offline Advanced Beginner
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    51
    Thanks June7.

    I did manage to get it working by setting the textbox tabstop property to false or true as the case may be. You are right about the going nuts bit though.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Just setting TabStop to true or false is simple enough, I do that. Trying to control the order programmatically is path to insanity.

    I even disable controls so user can't even click into them, which is still possible when tab stop false.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Deutz is offline Advanced Beginner
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    51
    You are probably right. I tend to keep hammering away until I get it working or die trying. I will defer to your sane approach if I run into any more problems with it.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-11-2011, 01:43 PM
  2. Replies: 9
    Last Post: 07-14-2011, 07:20 AM
  3. index/primary cannot contain null value
    By BinHDreW in forum Access
    Replies: 1
    Last Post: 05-26-2011, 08:25 PM
  4. Need Index Number for FormatConditions
    By newbie in forum Access
    Replies: 3
    Last Post: 01-06-2011, 02:00 PM
  5. Eerror No unique index found
    By newtoAccess in forum Database Design
    Replies: 4
    Last Post: 12-10-2010, 08:30 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