More than one subform on a tab control page?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

It is possible to add a second subform in design mode, but the second subform
displays the same data as the first.

Is it possible to have more than one subform per page?
 
Tab pages, as far as Access is concerned, are the same thing as the Main
form. So yes... you can have 2 subforms on one tab page.
But, since the purpose of tabs is to compartmentalize your data... I
would think you would want that 2nd subform on it's own tab page.
It is possible to add a second subform in design mode, but the second
subform
displays the same data as the first.
Don't understand this. Why would you want to do this, please clarify...
hth
Al Camp
 
More confusion.
I separated the two subforms so that each was on its own page. Again the
second did not work. The first subform appeared on the second page. I can
change the data source back to what I require, but Access changes it once
more.
Is this a known problem?
 
More confusion.
I separated the two subforms so that each was on its own page. Again the
second did not work. The first subform appeared on the second page. I can
change the data source back to what I require, but Access changes it once
more.
Is this a known problem?

What are the REcordsource properties of the two subforms? I very
strongly suspect that the Tab Control is a red herring, and has
nothing to do with your problem.

Another possible problem - if you see the same Subform showing up on
both tab pages of a Tab control - is that you may have dragged the
Subform *in front of* the Tab Control. In order to actually insert the
control onto a tab page, you must:

1. Select the Subform (or any other control) in design mode so it's
highlighted
2. Type Ctrl-X to cut it to the Clipboard
3. Select the tab of the page on which you wish to put it (the page
will darken to indicate that it's been selected). You must select the
*tab*, not the surface of the page.
4. Type Ctrl-V to paste the subform (or whatever) onto the tab page
5. Move it around on the page to where you want it.

John W. Vinson[MVP]
 
Graham,
I can't understand for sure what you're doing, but ...
You wrote...Maybe your problem is the way you placed subForm1 and subForm2 on their
Tab Pages...

Whenever you place a subform (or any object) on a tab page, that tab page
must be "selected" at the time the control is "dragged" onto it, or pasted
on to it.

When you placed subForm1 on Page1, Page1 one probably wasn't "selected",
so subForm1 will show "through" all your tab pages.

"Cut" subForm1, then... "Select" tab Page1, and "paste" the subForm1
onto it. Now subForm1 will only show on tab Page1. Do the same with
subform2 and tab Page2.

I think that's what you're having trouble with... if not we'll need all
the details about each subform, and each page.
hth
Al Camp
 
I shall try to be specific. For the purposes of this problem I have three
tables. The first contains data about people with a primary key "Id". The
second contains all the ways of contacting them, home phone, work phone,
mobile fax, e-mail etc. The third contains notes about phone conversations
etc with the people. The second and third tables contain a pointer to the
corresponding "Id".
I am using Access 2000.
I select a page by clicking on the tab.
Click the subform/subreport in the toolbox.
Move the cursor to the page, which "changes color".
Using the cursor, define an area for the subform.
This brings up the Subform wizard.
Select the required form.
Select the master and child fields that link form and subform.
Accept the suggested control name.
Repeat for next page, with a different form.
In design mode the forms look OK.
Switch to data mode.
On the second page the control name is as it should be, but the first
subform appears.

Switch to design mode.
The first page is as was.
The second page does not contain the detail of the form, just white space
with the name of the first form.

John, you may be correct in diagnosing that the subform is *in front of* the
Tab Control, but I do not understand.

What am I doing wrong?
 
Move the cursor to the page, which "changes color".

That's where you (very reasonably!!!) went wrong.

Follow the suggestions about cutting and pasting the Subform control.
AFAIK it's the only way that works.

John W. Vinson[MVP]
 
Thank you Al and John. Your replies made me look carefully at what I was
doing, which was correct and should have worked. With further attempts I
found that Access was getting really screwed up. I installed Office Service
Pack 3 which cleared my problem. Tab control pages now have as many subforms
as I want.

Thanks again

Graham
 
Back
Top