Access: sub forms on a tab control

M

Michael

Hi

I have a form that contains a tab control. There are a
number of pages on this control, with each page containing
a sub form.

Here's an example:

Form1 has a tab control called Tab1.
Tab1 has three pages: Page1, Page2, Page3.
Page1 contains SubForm1 - this subform was added first.
Page2 contains SubForm2.
Page3 contains SubForm3.

The problem occurs when I save Form1. Access then sets the
subforms on pages 2 and 3 to be SubForm1, i.e. the subform
that was added first. I end up with;
Page1 contains SubForm1.
Page2 contains SubForm1.
Page3 contains SubForm1.

I have tried compact and repair on the database and that
did not work. I tried building a new database (rather than
editing the existing one) and the same problem occurred.

I've also looked at other databases I have created that
have subforms on different pages of a tab control. Rather
nervously I tried saving the forms, but Access did not
reset the subforms. Phew...

Any ideas as to why this is happening with a new database?

Thanks

Michael
 
G

Guest

You probably did not click on the tab before adding the subform, thus adding it to all tabs. Easily done, I've done it myself. A stupid design by Microsoft.
 
M

Michael

Thanks for the tip.

I've added three different subforms to three separate
pages of the tab control. If I run the form I can see the
correct subforms on the correct pages. When I go back
into design view and save the form, Access then sets all
the subforms to be the same as the first subform added.

After more investigation I've found that Access only does
this with some subforms and not others. I can't for the
life of me find out why this is, nor can I fix it.

If anyone can shed some light on this I'd be so happy :)
 

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