Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with 1-1 Relationship

Status
Not open for further replies.

LakotaMan

Instructor
Aug 21, 2001
240
US
Hi all,

Have searched in the FAQ for this particular problem discussed and haven't found it, so here goes:

I have two tables, joined by an autonumber field on one side and number on the other. When I make the join, Access wants this to be a 1-many, like all my other tables. Problem is, I need a 1-1 here. How can I accomplish this?

The use of autonumbers as key fields was not my choice, I inherited this design and though I'd rather not, must keep it.

Thanks,
Tru
 
It should link 1:1 if the second table's number field is set to not allow duplicates.
 
There is only one type of join. It will do 1-1 or 1-n depending on what data it finds. You don't have to do anything to change the join, mainly because there isn't anything you can do.

What problem are you having with this?

 
In the second table the foreign key number field must be indexed as no duplicates, then in your relationship diagram you should be able to create it as one-to-one.
 
Thanks to GoDawgs and jdemmer for your help, I have set the index to no duplicates and things are fine.

I appeciate your quick and patient response to a very dumb question, this forum has always been polite and extremely helpful.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top