Form with multiple "tabs"

F

forest8

Hi

I am trying to create a survey in access but would like to separate the form
into sections: General, School, Family, Relationships, Needs.

Instead of creating 1 single form, what I would like to have are "tabs" for
each section.

How would I go about and create this?
 
P

Petr Danes

This is very simple. Just pick the 'Tab' control on the toolbar and click on
your form to make an instance of the tab control there. It starts with two
tabs, but you can right-click on the control and select 'Add page' as many
times as you need pages. Other controls are picked from the toolbar in the
usual way and dropped onto the appropriate page of the tab control. The tab
control changes color when the cursor 'carrying' a new control is moved over
it - if it doesn't, your new control won't be added to the tab control, but
directly onto the underlying from. Whichever page is active (on top) will
get the new control.

All other functions work normally. VBA allows some additional magic when
controls are on tab control pages, but their normal functions remain intact.

Pete
 
F

forest8

Hi

It may be simple to you but it's still a bit confusing to me.

When I select the tab control, I can't seem to add any info for the form
within the tab. It blacks out and I can't seem to add any details.

Also, is it possible to do this after I created the forms I want for the
"tabs"?

Thanks
 
M

Melissa C. Winans

It is ture that the tab turns black when you drag a field onto it, but if
you release the mouse button the field should be added. Is this not what is
happening for you?
 
L

Linq Adams via AccessMonster.com

Here's another quick little tutorial I give people on the use of Tabbed Pages.
It addresses some of the common problems experienced with them:

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, whether it be a textbox, command button or subform, 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! If a single page has been selected, when your cursor carrying the
control appears over the page, a black "insert" will appear.

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, you 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 the 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top