one to many howto????

one to many howto????

Post by fastfis » Sat, 31 Dec 2005 04:47:11


I can't seem to figure out how to creat a one to many relationship

access 2k

in the relationships window i drage the primary key from one table to
the forgien key of another.

it creates a "intermediate" relation with no obvious way to make it a
one to many.

also the check boxes for cascade updates/delete and integrity are not
available

I must be missing something obvious

tia

chris
 
 
 

one to many howto????

Post by Stev » Sat, 31 Dec 2005 04:59:24

Use the 'Join Type' button after dragging your primary key to your
foreign key.

 
 
 

one to many howto????

Post by Jana » Sat, 31 Dec 2005 05:00:50

Chris:
Primary Key in your 'one' table should have the little key icon next to
it when you're looking at the design of the table, and the 'indexed'
property should say 'Yes (No Duplicates)'. Foreign key in your 'many'
table's design should have indexed property as 'Yes (Duplicates OK)'

If you have the primary key properly defined in the 'one' table, it
should be bold when you see it in the relationship window. Then, in
the 'many' table, it should not be shown in bold. If that is the case,
when you drag the bolded primary key to the non-bolded foreign key, it
should automatically create the one-to-many relationship. Hope that
makes sense!

HTH,
Jana
 
 
 

one to many howto????

Post by fastfis » Sat, 31 Dec 2005 05:23:48

Thx Jana - you pointed me in the right direction - I was trying to set
up my relationships in the front end of a split db - i needed to be in
the _be

-chris
 
 
 

one to many howto????

Post by fastfis » Sat, 31 Dec 2005 05:29:45

Now i seem to have 2 different set of relationships??? on in the Front
End and one in the back end.

How does that work???

Should i have all my relationships in the _be ?
 
 
 

one to many howto????

Post by Jana » Sat, 31 Dec 2005 06:10:55

Chris:
You should define your relationships in the back end, and then, (I
believe) they will transfer over to the front end when you link to the
tables.

Jana
 
 
 

one to many howto????

Post by fastfis » Sat, 31 Dec 2005 07:45:06

thx again Jana -

one more question

I am setting up my relationships on my dev version of the Back End w/
test data in the tables.

Is there a way to move just the relationships over to the production db
be??

-chris
 
 
 

one to many howto????

Post by pietlinde » Sat, 31 Dec 2005 09:37:08

Probably easier to just move the data... You need to move in
"parent-most" order if you have referential integrity declared.
(Customer, then Invoice, then Products, then InvoiceDetails) (have a
look at Northwind. You start at the "one" side of all the
relationships and move down.