By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

Two primary keys in a table

100+
P: 110
hello,

I had the need to create a table with 3 columns that are allowed to have same values except there can be only one particular value in column C for any combination of column A and B.

Eg:

A B C
1 6 7
1 5 4 <-Valid
9 6 3 <-Valid
1 5 2 <-Invalid because there are two values for when A=1 and B=5

I know access doed not allow two primary keys in one table, so i made a switchboard table and used it as my table (It has two p keys)

I can edit the data in this table no problem. When I try to do this using a form, it doesnt work....ideas? or things i should know about? just throw em at me...
Mar 15 '07 #1
Share this Question
Share on Google+
3 Replies


100+
P: 110
never mind..figured it out....finally getting the hang of access
Mar 15 '07 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
never mind..figured it out....finally getting the hang of access
That's good to know. :)

For future searches by members can you post how you solved your problem.

Mary
Mar 17 '07 #3

100+
P: 110
for sure, select both fields and assign them as primary key


if that doesn't work, make a switchboard table and edit that table to suit your needs.

Switchboard table uses two primary keys
Nov 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.