rookie needs relationships help

O

orbit639

im fairly new to acess so im not sure if this is an easy question or not. i
have 2 excel files with a related field called psal. the PSAL field can have
up to 8 rows with the same PSAL number, all related by the step field.

val1 val2 val3 PSAL code step
1 0 0 31 55 0
0 0 0 31 18 1
0 0 0 33 31 0
0 0 0 35 31 0
20 32 254 37 19 0
1 1 0 37 20 1
200 16 254 37 19 2
0 0 0 37 21 3

in this 2nd excel sheet there is only 1 entery for the PSAL number from the
first excel sheet. they are related in this way: the top example iare the
instuctions, broken down into steps. this bottom example is the actual number
that is assigned so it knows what PSAL entery to use. i hope this makes
sense.

PSAL ARTL PLYL poso
31 32 29 0
33 34 29 1
35 36 29 2
37 38 29 3
39 40 29 4
41 42 29 5
43 44 29 6
45 46 29 7
47 48 29 8
49 50 29 9
51 52 29 10

so here is my question. i need to get it so when i edit a psal entry in the
top example, it not only changes all the psal entrys in that colum, but
changes the PSAL entires in the other colum as well.

ive tried to make a one to many relationship, and i can get to work in the
worng order, but im lost as to how to get this to work. i hope anyone can
help and will be grateful for any info.
 
A

a a r o n . k e m p f

dude, you should grow from Excel to SQL Server-- moving from Excel to
Access is like jumping from the fire to the frying pan
 
A

a a r o n . k e m p f

yes, no PSAL is a foreign key in the first table, and a primary key in
the 2nd table.

Right?
 
B

BruceM

Some more description of the database's purpose would probably help. My
guess is that the second spreadsheet contains data that would be in the
parent table (the "one" table), and the other spreadsheet contains the child
table (the "many" table) data, but it is hard to be sure. If the linking
field is subject to change it may be better to use something else as the
linking field. The PSAL number in the parent table can be reflected in a
display of the child table records without actually storing it.

If there is a real need to change the primary key (linking field) value you
could use cascading updates, but I think it would be best to avoid this if
you can.
 

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