By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,830 Members | 1,724 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,830 IT Pros & Developers. It's quick & easy.

Automatically add new records

P: n/a
Hi

I have a list of students undetaking various sports activities.
Currently the students are listed in tblGroupMembers and I manually go
into a form/subform and allocate each activity for each student pulling
the activity name from a combo sourced from tblActivities into a new
record within table- tblAssessmentActivity. There is a one-to-many
relationship between tblGroupMembers and tblAssessmentActivity so that
Student A ends up with records for Tennis, Golf, Football etc.

So- what I would like to do is "simply" list a student or a group of
students, list the series of activities that they will do and press go
and the database automatically creates all the new activity records per
student.

Is this possible? If so please advise.

thanks

David

Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Yes this is possible. There are few ways to do it. The simplest is to
have an unbound combo field on your form of all your activities.
Select your group of students, select the activity they will be doing,
then have an append query add the data to your approriate table.

Nov 13 '05 #2

P: n/a
Dean- thanks for the reply but I'm still a bit lost on this- how would
an append query create a series of new records per student? I need to
create and relate a series of records to a series unique records that
already exist:

i.e. selecting a command would automatically give Fred, Wilma and
Daphne (each unique records in tblGroupMembers)- 3 new activites each-
Tennis, Football and Swimming - creating 9 new records in total (with
each sport being a unique record in the tblActivityProfile table)

many thanks

David

Nov 13 '05 #3

P: n/a
Each sport is unque to each student. Your primary key should include
two fields. The append query can be used to add a list of ALL sports
to a preselected student(s).

Nov 13 '05 #4

P: n/a
Again Dean thanks and I'm sorry I'm being so thick here but I can't see
how this works as the action would need to create new activity
assesment records before the actual activity field could be appended-
for each student.

i.e David, John, Mary are students (group members) with no activity
assessments. 10 activities are highlighted. A command is selected and
30 new records are created in the activity assessment table which is
linked to the student table- making 10 per student. i.e David has
related activity assessment records for football, golf, tennis etc as
does John and Mary.

Primary keys- GroupMemberID (in tblGroupMembers) linked to
GroupMemberID in tblActivityAssessment to create the one-to-many
relationship, with AcitivityAssessmentID as the primary key in this
table.

The activities themselves are held uniquely in a separate table-
tblActivities and all I'm doing there is looking up the data to create
the activity assessment records for each student.

I'm really grateful for any further advice.

thanks

David

Nov 13 '05 #5

P: n/a
You need a 3rd table that links students and the activities. So every
student will have ten records. The GroupMemberID and ActivitieID are
both the primary key in this table.

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.