Form design - Setting the tab index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • edme
    New Member
    • Jul 2010
    • 10

    #1

    Form design - Setting the tab index

    Hello

    I have form with a few fields (text box and combo list).
    I set up the tab index for all the fields that the combo list will be first and after that all the text box.

    But when opening the form the tab index skips the combo list to the first text box, what can I do to set the cursor in the first combo list in my form ?
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    If you right-click on any of the tabbable controls there will be an option called Tab Order... Select this and order the items as you will.

    Comment

    • edme
      New Member
      • Jul 2010
      • 10

      #3
      I did, and in the tab order it is defined as I want it (meaning first the Combo list and after that all the text box) but for some reason the cursor is sitting on the first text box.

      Comment

      • dsatino
        Contributor
        • May 2010
        • 393

        #4
        There is also an option called 'Tab Stop' that can be set Yes/No and you may have it on 'No'.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          If the ComboBox is in the list then I would expect the .TabStop property already to be set to Yes (but good thinking anyway).

          The only other thing that I can think of is that you already have some code on your form (Load or Open) which sets the active control to the TextBox. I'd check for that next. It's also an alternative solution to your problem of course, but your trouble now is a perfect illustration of why it's not the recommended approach. It can confuse people. Much better to manage it in the design of the form.

          Comment

          • edme
            New Member
            • Jul 2010
            • 10

            #6
            TabStop is set to Yes for the ComboBox and there is no code that sets the control to the text box.

            Still not working, any thoughts ?

            Comment

            • dsatino
              Contributor
              • May 2010
              • 393

              #7
              do you have it disabled?

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32669

                #8
                Can you post the Tab Index values for both the ComboBox and the TextBox that receives control when the form is opened.

                Comment

                • edme
                  New Member
                  • Jul 2010
                  • 10

                  #9
                  Combolist 1 (tab index:0 tab stop:yes)
                  Combolist 2 (tab index:1 tab stop:yes)
                  TextBox 1 (tab index:13 tab stop:yes)

                  all 3 fields are enabled.

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32669

                    #10
                    That seems a clear enough answer. Unfortunately it leaves no clues as to why it's behaving in this way. Maybe it's time I ask you to attach a copy of your database for me to look at. I'll drop a copy of the general instructions below.

                    When attaching your work please follow the following steps first :
                    1. Remove anything not relevant to the problem. This is not necessary in all circumstances but some databases can be very bulky and some things do not effect the actual problem at all.
                    2. Likewise, not entirely necessary in all cases, but consider saving your database in a version not later than 2003 as many of our experts don't use Access 2007. Largely they don't want to, but some also don't have access to it. Personally I will wait until I'm forced to before using it.
                    3. If the process depends on any linked tables then make local copies in your database to replace the linked tables.
                    4. If you've done anything in steps 1 to 3 then make sure that the problem you're experiencing is still evident in the updated version.
                    5. Compile the database (From the Visual Basic Editor select Debug / Compile {Project Name}).
                    6. Compact the database (Tools / Database Utilities / Compact and Repair Database...).
                    7. Compress the database into a ZIP file.
                    8. When posting, scroll down the page and select Manage Attachments (Pressing on that leads you to a page where you can add or remove your attachments. It also lists the maximum file sizes for each of the allowed file types.) and add this new ZIP file.

                    It's also a good idea to include some instructions that enable us to find the issue you'd like help with. Maybe some instructions of what to select, click on, enter etc that ensures we'll see what you see and have the same problems.

                    Comment

                    Working...