Tab Controls-4 subforms with the same record source?

G

Guest

I have a main form in which I put 4 tabs named Page1, Page2, Page3, and Page4
on the form. On each tab, I put 4 subforms named Subform1, Subform2,
Subform3, and Subform4 correspondingly. These 4 subforms have the same record
source, RS. I have 3 multiple primary keys, PK1, PK2, and PK3. The user will
enter the data, i.e., scores into the first page (Subform1) and then click on
the tab2 to continue enter data into the second page (Subform2) and so on.
The problem is when I am done entering data into the first page and then the
second page, and then click on the third tab, it pops up an error message.

I would like to save data entered into all 4 subforms (4 pages) into the
same recordsource (a table). Please help me to solve this problem.
Thank you in advance - tim
 
R

Rick Brandt

Tim said:
I have a main form in which I put 4 tabs named Page1, Page2, Page3, and Page4
on the form. On each tab, I put 4 subforms named Subform1, Subform2,
Subform3, and Subform4 correspondingly. These 4 subforms have the same record
source, RS. I have 3 multiple primary keys, PK1, PK2, and PK3. The user will
enter the data, i.e., scores into the first page (Subform1) and then click on
the tab2 to continue enter data into the second page (Subform2) and so on.
The problem is when I am done entering data into the first page and then the
second page, and then click on the third tab, it pops up an error message.

I would like to save data entered into all 4 subforms (4 pages) into the
same recordsource (a table). Please help me to solve this problem.
Thank you in advance - tim

Why are you using subforms? Sounds like the main form should just have four
pages of controls.
 
G

Guest

Rick Brandt said:
Why are you using subforms? Sounds like the main form should just have four
pages of controls.

Hi Rick,
That's a good question. Maybe because it's convenient. I just create a
subform and put textboxes on it and put it on each tab. I had tried not to
use subforms but it was messy when I put stuff on the first tab and move to
the next tab. Do you think it's possible to put textfields straight onto the
tab and move to the next tab and repeat the process? How to avoid the mess of
overlapping?
Thanks - tim
 
R

Rick Brandt

Tim said:
Hi Rick,
That's a good question. Maybe because it's convenient. I just create a
subform and put textboxes on it and put it on each tab. I had tried not to
use subforms but it was messy when I put stuff on the first tab and move to
the next tab. Do you think it's possible to put textfields straight onto the
tab and move to the next tab and repeat the process? How to avoid the mess of
overlapping?
Thanks - tim

I don't understand what the "mess of overlapping" is.

If your basic "need" is to enter data into a single record of a single table
then a single form with no subforms should accomplish that. If the number of
fields is high enough to cause space problems then a TabControl with multiple
pages can solve that problem by allowing you to put some of your control onto
each TabPage.

What part of the above is giving you problems and how do you think using
subforms is solving those problems?

Of course it is possible to put some controls onto the first TabPage and then
move to another TabPage and put more controls there That is the primary usage
of a TabControl. Where in that process did you have difficulty?
 
G

Guest

Another reason why I am using subforms is because I have a main form that has
different record source. The purpose of this main form is showing up data
from a table (i.e., tblStud) so that the user does not have to typing in and
guarrantee that data is accurate. However, in the tabs, those data entered by
the user need to be collected and stored into another table. That's why I use
the subforms. Since there are many items on the subforms so I "break" down
and make 4 subforms. How can I deal with this issue - thanks - tim.
 
R

Rick Brandt

Tim said:
Another reason why I am using subforms is because I have a main form that has
different record source. The purpose of this main form is showing up data
from a table (i.e., tblStud) so that the user does not have to typing in and
guarrantee that data is accurate. However, in the tabs, those data entered by
the user need to be collected and stored into another table. That's why I use
the subforms. Since there are many items on the subforms so I "break" down
and make 4 subforms. How can I deal with this issue - thanks - tim.

So then you need a main form with ONE subform and on the subform have the four
TabPages to split up how the controls are laid out.
 
G

Guest

I think it is a solution! Let me try and I will let you know when I am done.
I appreciate your help - tim
 
G

Guest

Tim said:
I think it is a solution! Let me try and I will let you know when I am done.
I appreciate your help - tim
*****************
Rick,
It works!! Thanks A LOT!!!
Happy Thanksgiving
tim

*****************
 

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