Prev: Auto populate field in table
Next: Skydrive
From: Barry A&P on 28 Apr 2010 16:11 I recently viewed a post that said "autonumber is fine as long as you dont display it to the user..." Everything in my database references autonumbers!! did i make a big mistake somewhere?? i am even marking parts with ID numbers that are generated by the autonumber field on a few of my tables... Should i be worried?? Do i need to seriously look into a new approach?? any comments are greatly appreciated.. Barry
From: Daniel Pineault on 28 Apr 2010 17:01 There is nothing wrong with autonumbers, even in more advanced dbs dbas create a form of autonumber (they call it differently but it serves the same purpose). The problem is that many people mistakenly try to rely on autonumbers as, for instance, a document number. It is merely a unique id associated to a record. In reality it should serve no other purpose. The end user should even be aware of autonumber. If you need to number your records and display it to the user, ie a sequential number associated to a document, then create a custom field in your table for this distinct purpose. Short answer, there is nothing wrong with autonumber, but rather the way some people mistakenly try an use them. Don't worry! -- Hope this helps, Daniel Pineault http://www.cardaconsultants.com/ For Access Tips and Examples: http://www.devhut.net Please rate this post using the vote buttons if it was helpful. "Barry A&P" wrote: > I recently viewed a post that said "autonumber is fine as long as you dont > display it to the user..." Everything in my database references > autonumbers!! did i make a big mistake somewhere?? i am even marking parts > with ID numbers that are generated by the autonumber field on a few of my > tables... > > Should i be worried?? > > Do i need to seriously look into a new approach?? > > any comments are greatly appreciated.. > > Barry
From: Fred on 28 Apr 2010 17:13 Same as what Daniel said...couple more notes. When it's said to never show it to the outside world, that's to guard against anybody ever trying to change one. The minute you try to use them for a real world use, you run the risk of somebody with more authority than brains or listening skills dictating a change or reassignment of a number which violates an important and essential database principle.
From: Jeff Boyce on 28 Apr 2010 17:59 Barry What Daniel and Fred said ... Access Autonumbers are designed to serve as unique row identifiers, nothing else. As such, they are rarely suitable for human consumption. Keep using them as unique row identifiers, but don't expect your users to understand ... OR CARE! If you want your users to care about some number, use Daniel's approach and create a new field, in addition to your autonumber field. Use that new field to hold a "sequence number". That one's OK to show the users... (and all things in moderation... a fellow whose experience I greatly respect quite often displays autonumbers to his user ... but he has a very high class of users ...<g>) Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Barry A&P" <BarryAP(a)discussions.microsoft.com> wrote in message news:30984979-018A-4DB1-AE3F-9BEDADF0833A(a)microsoft.com... >I recently viewed a post that said "autonumber is fine as long as you dont > display it to the user..." Everything in my database references > autonumbers!! did i make a big mistake somewhere?? i am even marking > parts > with ID numbers that are generated by the autonumber field on a few of my > tables... > > Should i be worried?? > > Do i need to seriously look into a new approach?? > > any comments are greatly appreciated.. > > Barry
From: Armen Stein on 28 Apr 2010 19:13
On Wed, 28 Apr 2010 14:59:31 -0700, "Jeff Boyce" <nonsense(a)nonsense.com> wrote: >What Daniel and Fred said ... Me too! >Access Autonumbers are designed to serve as unique row identifiers, nothing >else. As such, they are rarely suitable for human consumption. Rarely, but not never. >If you want your users to care about some number, use Daniel's approach and >create a new field, in addition to your autonumber field. Use that new >field to hold a "sequence number". That one's OK to show the users... > >(and all things in moderation... a fellow whose experience I greatly respect >quite often displays autonumbers to his user ... but he has a very high >class of users ...<g>) We sometimes let the users see an Autonumber, when they need to correctly identify one record among many similar records - transactions for example. Of course they can't change it, and we tell them not to worry about gaps in the sequence. Once we explain that it's just a unique "Reference Number" (we actually sometimes call it that in the UI), they seem to do just fine with it. It's easier than building our own sequence number. Armen Stein Microsoft Access MVP www.JStreetTech.com |