Relationship

C

Craig Pfaff

Hi,

I don't know if you can answer this without seeing the database, but I'm
trying to create a one to one relationship, all I'm getting right now is a
one to many.

Thanks Craig
 
A

Allen Browne

You will get a one-to-one if you create a relationship based on the
*primary* key field in both tables.

BTW, one-to-one relations are fairly unusual. If you are seeking to create
one because you've run out of fields (i.e. you need more than 255 fields),
the database is not normalized correctly. We see this problem all the time
with people who don't understand the basics. Apologies if the comment does
not apply to you.
 
J

John Vinson

Hi,

I don't know if you can answer this without seeing the database, but I'm
trying to create a one to one relationship, all I'm getting right now is a
one to many.

Thanks Craig

You need a unique Index (such as a primary key, though that's not
obligatory) on the join fields in both tables.

As Allen says, one-to-ones are uncommon. (I've got three in my current
60-table database, but I'm intentionally Subclassing). If the terms
"Subclassing" or "Table-based field-level security" are relevant, more
power to you; if not, maybe you should consider how your tables are
structured, and perhaps post a description.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top