Calgarypuck Forums - The Unofficial Calgary Flames Fan Community
Old 07-22-2013, 03:13 PM   #1
TheyCallMeBruce
Likes Cartoons
 
TheyCallMeBruce's Avatar
 
Join Date: Apr 2004
Exp:
Default Access question regarding autonumbering

Hi guys, I'm a bit stumped here regarding Access. Is there a function in access that will allow you to do autonumbering in this format:

example:

Let's say my record goes, Corvette, December Corvette, January, Corvette, February then Porsche, January Porsche February. In this case I'd want an ID field that went from 1-3 for the duplicate values of Corvette, and then 1-2 for the duplicate values of Porsche


What I'm trying to do is create an autonumbering ID field

I've tried dcount and such without any luck. Any help would be appreciated.
TheyCallMeBruce is offline   Reply With Quote
Old 07-22-2013, 03:18 PM   #2
calumniate
Franchise Player
 
calumniate's Avatar
 
Join Date: Feb 2007
Location: A small painted room
Exp:
Default

Easiest way for autonumbering in Access is to go - External data, Access, import your table and let access assign a primary key.
calumniate is offline   Reply With Quote
Old 07-22-2013, 07:56 PM   #3
edslunch
Franchise Player
 
edslunch's Avatar
 
Join Date: Apr 2009
Exp:
Default

It seems like you really have a two part key - month and make. If you want a single id field for a record that contains both make and month then just use an auto generated ID that will be 1 to 5 in his case and will be essentially meaningless, just unique across all records. If you want to be more sophisticated create a make table and a month table then a make and model table that has foreign keys to the other tables.
edslunch is offline   Reply With Quote
Old 07-22-2013, 08:03 PM   #4
calumniate
Franchise Player
 
calumniate's Avatar
 
Join Date: Feb 2007
Location: A small painted room
Exp:
Default

Quote:
Originally Posted by edslunch View Post
It seems like you really have a two part key - month and make. If you want a single id field for a record that contains both make and month then just use an auto generated ID that will be 1 to 5 in his case and will be essentially meaningless, just unique across all records. If you want to be more sophisticated create a make table and a month table then a make and model table that has foreign keys to the other tables.
Agreed. I was a little confused reading the question and so only answered the autonumbering part. A better model (aside from having two tables) would be to have make in one column and month in another.
calumniate is offline   Reply With Quote
Old 07-23-2013, 07:54 AM   #5
TheyCallMeBruce
Likes Cartoons
 
TheyCallMeBruce's Avatar
 
Join Date: Apr 2004
Exp:
Default

Thanks for the help guys. I think my db manage to figure out a way.
TheyCallMeBruce is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 10:34 PM.

Calgary Flames
2023-24




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021