Multiple tables on a tabcontrol form

G

Guest

Im not sure of verbage for this so forgive me. But I have created a
tabcontrol form from scratch. During the creation it askes for a table to
use, no problem. But now I have filled the table with 255 fields. So my
dilema is adding more fields, I see that subforms may be the only answer.
But I cant seem to find if its possible to open another separate table to
keep the original table smaller. Is the subform option the answer? Can I
open/import/add another table? Thanks for your help in advance.
 
G

Graham R Seach

Gary,

I'm afraid if you have 255 fields in the one table, then your table design
needs to be re-thought. Many of the fields in that table should, in fact, be
in other tables.

See the following for more information:
http://en.wikipedia.org/wiki/Database_normalization

Also search the Internet for "normalization".

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 
G

Guest

Thanks Graham for the rapid reply and for the link. Let me present one
example of how the table got so big and maybe you could explain what im not
quite getting. Lets say im creating a table to keep record of weightlifting
sessions. I have a muscle group, a exercise, and lets say 4 sets. Each set
has reps and weight. Now I move on to another exercise in the same muscle
group. Now I have on in the table a separate field for each exercise and
group, weight and reps... not sets I label the rows on the form. So as you
can imagine I will fill up many fields very fast with 16 exercises on the
screen. Should I be creating one field for one complete set? What Im trying
to do is have a spreadsheet look so you could lets say see your whole muscle
groupe on the screen while exercising. Is this even close or am I way off?
And again thanks for the help.
 
G

Graham R Seach

Gary,

tblSession
* SessionID (AutoNumber - Primary Key)
SessionDate (DateTime)
Other info, as required

tblSet
* SetID (AutoNumber - Primary Key)
SessionID (Long Integer - Foreign Key to tblSession.SessionID)
ExerciseID (Long Integer - Foreign Key to tblExercise.ExerciseID)
Repetitions (Integer)
Weight (Single)

tblExercise
* ExerciseID (Autonumber - Primary Key)
MuscleGroup (Text)
Other info, as required

The relationships are as follows:
* tblSession.SessionID --> tblSet.SessionID = One to Many
* tblExercise.ExerciseID --> tblSet.ExerciseID = One to Many

With this architecture (keeping in mind, I don't know everything you need to
record), you can record many exercises, and use them as *templates* for many
sets/sessions. You can record many sets per session, as well as many
sessions.

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
---------------------------
 
G

Guest

wow, ok! Thanks very very much. I really appreciate the time you took to do
this. I will give it a shot.
 
G

Graham R Seach

Gary,

Once you have that schema (or something similar), you can create a main form
for, say, Sessions, and subforms for the rest, linking on SessionID. In this
way, moving from Session to Session, you can see all the Sets involved in
each Session.

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
---------------------------
 
G

Guest

ok so subforms is the way to bring in information/tables on a tabcontrol
form. Very cool, you were an incredible help thanks so much for giving of
your time!
 

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