Two field primary key in a one to many relationship

G

Guest

I have a table Mineral Rights with a primary key as the combination of two
fields, Mineral ID and Tract #. A second table called Properties with a
primary key field called Property ID. I created a junction table with
Mineral ID, Tract #, and Property ID with those three fields comprising the
PK. I have a main form based on the Mineral Rights Table and a sub form
based on the Properties table. I cannot figure out how to get my junction
table populated or even if it is possible with the way I set up the PK in the
Mineral Rights table. Any help will be appreciated.

Thanks
 
G

Guest

Consider setting a unique index on the combination of the Mineral ID and
Tract # fields. Then add a meaningless autonumber primary key. I think you'll
find this easier to work with. Here is one opinion on the topic of combined
field primary keys:

http://www.utteraccess.com/forums/s...=247916&page=0&view=collapsed&sb=5&o=&fpart=1

I recommend that you avoid the use of special characters (spaces, # signs,
etc.) in the names that you assign when using Access. Here are links to some
articles that you may find useful:

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Commonly used naming conventions
http://www.mvps.org/access/general/gen0012.htm
http://www.xoc.net/standards/default.asp


Also recommended: Avoid the use of any reserved words

Reserved Words in Microsoft Access
http://support.microsoft.com/?id=286335

List of reserved words in Jet 4.0
http://support.microsoft.com/?id=321266


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 

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