is data entered in one field supposed to appear in another field .

G

Guest

I have a simple question: I have two tables, a student table and an
assignment table. The tables have been related through a one-to-many
relationship using the primary key called "student code". In addition, I have
created a form to enter student data and one to enter assignment data. It
seems to me that once I enter the student data, including the student code,
into the student table, this information should also appear in the assignment
table. Surely I do not have to enter the student code x number of times for
every assignment that is given to the student. Is there some setting that I
have overlooked that copies data to all related tables with the same field?

Second, do I have to have data entered before I run a query?

Any help would be greatly appreciated as I am completely frustrated.
 
R

Rick Brandt

db said:
I have a simple question: I have two tables, a student table and an
assignment table. The tables have been related through a one-to-many
relationship using the primary key called "student code". In
addition, I have created a form to enter student data and one to
enter assignment data. It seems to me that once I enter the student
data, including the student code, into the student table, this
information should also appear in the assignment table. Surely I do
not have to enter the student code x number of times for every
assignment that is given to the student.

You are mistaken and you would in fact have to re-enter the student code in each
assignment record UNLESS you set up the forms such that the assignments form is
an embedded subform within the student form. Then entering the name of the
student code field into the MasterLink and ChildLink properties of the subform
control would cause two behaviors.

1) The records shown in the assignment subform would automatically be filtered
to only show assignments for the student currently displayed in the main form.

2) New records created in the assignment subform will automatically inherit the
student code value from the main form record.

Second, do I have to have data entered before I run a query?

You could create a query using the two tables before entering any data, but of
course the output of the query would also be empty so it would be difficult to
determine if the structure of the query was correct.
 
J

jacksonmacd

If you drop your assignment form onto the student form (ie, make it a
subform), and properly set the link fields properties of the subform,
then the linking field will be populated automatically.


On Sat, 4 Feb 2006 19:51:27 -0800, "db struggle" <db
I have a simple question: I have two tables, a student table and an
assignment table. The tables have been related through a one-to-many
relationship using the primary key called "student code". In addition, I have
created a form to enter student data and one to enter assignment data. It
seems to me that once I enter the student data, including the student code,
into the student table, this information should also appear in the assignment
table. Surely I do not have to enter the student code x number of times for
every assignment that is given to the student. Is there some setting that I
have overlooked that copies data to all related tables with the same field?

Second, do I have to have data entered before I run a query?

Any help would be greatly appreciated as I am completely frustrated.

**********************
(e-mail address removed)
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
 

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