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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

having a table with more than one primary key????? 1

Status
Not open for further replies.

thepope77

Technical User
Jul 1, 2003
26
US
Hi:

I have a table with test data that includes ID numbers. The ID number is the primary key. However, these ID numbers do not take the current year into account. So, my problem is that when the same number from last year is keyed in this year, there is a primary key violation.

One idea to combat this was to create another field in the table, "Year", and fill the current year in that field. Then, I could possibly have Access look at the combination of those two fields, "IDNumber" and "Year" to determine key violation or not.

Could someone please tell me if this is feasible or not? Thanks a lot. I really appreciate the help.

Daniel Pope
 
Yes it is feasible. Open the table in design view select both columns and click the primary key button.

Good Luck
 
Wow! That was simple. I was thinking way too hard. I'll remember that forever now.

Thanks a lot for your fast response.

Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top