O
Omar
Hello,
thank you for taking the time to read this, I appreciate
it very much.
Im creating a database the allows an individual/student to
input different activities. I created 4 tables.
table 1-- this table contains fields like userid, date,
hours, exercising, activity type, etc. It also includes an
autonumber field call trackingID set to primary key. I
used this table to create a main form. The other two
tables will be subforms within this form.
table 2-- this table contains specific items for an
activity like basketball.
table 3-- this table contains specific items for an
activity like football.
table 4-- this table contains a list of all students in
the class.
I then created a form that contains all the fields in
table 1. Within the form, I added (using the tab control
and subform tool) 2 subforms. These subforms were created
using table 2 and 3.
Hopefully I did a decent job of explaining.. Now for the
questions..
First, I have a control box within the main form that
allows you to choose either of the activity (football or
basketball). I would like to choose football or basketball
from the pull down menu and have access point to its
respective subform tab. For example.. Under the main form
i would like to select football as my activity and would
like access to display the football tab listing the
football subform.
Second, I would like to create a relationship between
table 1 and 2,3. I do not know what type of relationship i
need in order to make this work. right now I have it setup
with a one-to-one relation between 1 and tables 2-3. using
primary key of trackingID from table 1 to primary key of
trackingID from tables 2and3. but this does not work..
I need the database to store multiple entries by one or
more users. For example, user001 may have 2 or more
activities for a particular day, and these entries could
be of the same "type"; meaning that user001 could play
basketball more than once a day, hence he would have two
entries for basketball on that day alone, this is beyond
doing another activity. hence, yes I need to allow users
to enter multiple records regardless of activity type.
thank you
thank you for taking the time to read this, I appreciate
it very much.
Im creating a database the allows an individual/student to
input different activities. I created 4 tables.
table 1-- this table contains fields like userid, date,
hours, exercising, activity type, etc. It also includes an
autonumber field call trackingID set to primary key. I
used this table to create a main form. The other two
tables will be subforms within this form.
table 2-- this table contains specific items for an
activity like basketball.
table 3-- this table contains specific items for an
activity like football.
table 4-- this table contains a list of all students in
the class.
I then created a form that contains all the fields in
table 1. Within the form, I added (using the tab control
and subform tool) 2 subforms. These subforms were created
using table 2 and 3.
Hopefully I did a decent job of explaining.. Now for the
questions..
First, I have a control box within the main form that
allows you to choose either of the activity (football or
basketball). I would like to choose football or basketball
from the pull down menu and have access point to its
respective subform tab. For example.. Under the main form
i would like to select football as my activity and would
like access to display the football tab listing the
football subform.
Second, I would like to create a relationship between
table 1 and 2,3. I do not know what type of relationship i
need in order to make this work. right now I have it setup
with a one-to-one relation between 1 and tables 2-3. using
primary key of trackingID from table 1 to primary key of
trackingID from tables 2and3. but this does not work..
I need the database to store multiple entries by one or
more users. For example, user001 may have 2 or more
activities for a particular day, and these entries could
be of the same "type"; meaning that user001 could play
basketball more than once a day, hence he would have two
entries for basketball on that day alone, this is beyond
doing another activity. hence, yes I need to allow users
to enter multiple records regardless of activity type.
thank you