Tab Control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mandyl
    New Member
    • Jun 2008
    • 2

    Tab Control

    Ok so what i am trying to do is to create a form, with 4 different tabs. I have no problems creating the form but my problem is that i am creating them in the design view and trying to aucutally use it and it doesnt work correctly.

    I went through and tried to read about VBA Codes and such to try and correct this problem but I cannot get a straight answer from a book. So i want to be able to have the tab controls function but they do not, every tab that you click on seems to have same boxes on them, i need to be able to pull up the form and enter 4 different types of info into 4 different tabs, i am only seeing one. I do have them linked to a Table, all of the information is on there but i need it in 4 different tabs.

    Can anyone help?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Here's a quick little tutorial I give people on the use of Tabbed Pages. It addresses the problem you're experiencing:

    First thing to remember is that the Tabbed Pages are all part of a single form; think of it as a really long form turned on its side. Because it is all one form, all referencing to any control on it is done in the same manner as if they were all on one single screen. Create a form in Design View. Goto the toolbox and click on the Tabbed Control icon; it actually looks like several manila file folders. Place it on your form and adjust the size to your liking. If you need more than the two tabbed pages it initially gives you, click on the tabbed control to select it. Goto Insert and click on Tabbed Control Page and another tabbed page will be added. Do this as many times as necessary.

    This is the really important part: when you go to add a control to a tabbed page, you must first click to select one of the pages, then add the control. Otherwise, the control will be added to the form itself, and will show thru on all tabbed pages!

    Once you have the form's Control Source (your table or a query) set up, you simple add controls as you normally would, heeding the above paragraph.

    Also important to understand! If you go to move a control from one part of your main form to a tabbed page, cannot drag and drop it! You must cut it, select the tabbed page, then paste it! And if the control has any code behind it, a GotFocus, OnClick, etc, after dropping it on the tabbed page, you'll have to "re-connect" it to its code. Select the control, goto Properties, click to the right of [Event Procedure] on whatever event to bring up the ellipsis (...) then click it to go to the code window. Exit the code editor and the control and its event code will be connected. One last thing. When trying to access the Properties of the Tabbed Control, such as the BackStyle, people complain that they can't find property. The problem is that they haven't selected the Tabbed Control, they've selected one of the pages of the Tabbed Control! The best way to be sure of selecting the Tabbed Control itself is to click to the right of the last tab. If you have 2 tabs, for instance, click in the blank area where Tab 3 would be, if you had a Tab 3.

    Welcome to Bytes!

    Linq ;0)>

    Comment

    • Mandyl
      New Member
      • Jun 2008
      • 2

      #3
      Linq,

      YOU ROCK!!!! That was the easiest thing ever! Thanks for all of your help, to think i have been working on this for months! Again, thank you!

      Mandyl
      Last edited by NeoPa; Jun 27 '08, 12:33 PM. Reason: Removed unnecessary quote

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        Glad we could help, Mandy!

        Linq ;0)>

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32656

          #5
          Originally posted by Mandyl
          Linq,

          YOU ROCK!!!! ...
          That's just what I was thinking!

          Easy to understand and makes something that a lot of people experience difficulty with, into a doddle.

          Nice going :)

          Comment

          Working...