design question

G

Guest

an hypothetical scenario...

there is one table

CODE(not autonum-key) ---NAME---SURNAME----AGE

AND

ID(autonumber---key) ----CODE----JOB----SALARY

is it possible when im typing a new record at the first table, the <code>
values to be replicated at the second table to the appropriate column? This
is very convenient especially when there r too many <code> values...
thanks
 
L

Larry Daugherty

If CODE is the Primary Key in the first table and a Foreign Key in the
second table then the answer is yes. In your table design for the
second table enter the field names and data types of the same fields
in the parent Primary key. In the Relationships window drag a
relation from the PK in parent table to the FK in child table. Set
Referential integrity on and enable cascading updates and deletes.
Look in Help for the venefits and consequences of doing that.
Typically you'd use a Form/Subform paradigm for data entry and
presentation. The parent record is displayed in the upper portion of
the form and the child records are displayed in a subform control on
the main form.

For any other situation, you should never have the same data in more
than one table. See the Rules for Relational Database Management
Systems.

HTH
 

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