Heenan, Lambert
Lambert.Heenan at AIG.COM
Thu Sep 8 15:48:26 CDT 2005
Sorry. I can't agree with that. The whole *point* of creating the 'numbers' with code is you can control it, and you can revise it when things have to change. Say you start of with a simple sequential number (not autonumber), 1,2,3 etc. Six months later you are told that all the numbers have to be padded to 6 digits. Ok, either change the field to a text field (if it wasn't such already), revise the number generator accordingly, and run an update query on the existing records to include the padding, or find all uses of the 'number' field everywhere in the database and change the formatting of the number display. [I know which choice I would make :) ] Then a year down the line the suits say "You have to include an alpha prefix that shows which office created the record". Fine (As long as you can identify the office within the rest of the data). You change the 'number' generating code to tack on the prefix for new records and then run an update query to add the prefix to all the existing records. Sit back and wait for the next bright idea about what extra information can be stuffed into a 'serial number'. All of this is just a minor pain in the butt because of course you are not using this field as a Primary Key, that's handled by an autonumber that no one sees, so all your relationships are intact. Lambert :-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, September 08, 2005 4:11 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Autonumber Assigned Immediately Except that the code you went to generate that unique number from the onset probably isn't gong to "adhere to the following rules..." anymore than an AutoNumber is. ;) Susan H. Exactly. An Autonumber is fine to display if your 'just want a unique number', but come the day that "the management" (or "the new guy") steps in and says "it's essential that we have a consistent numbering scheme in all of our case records. It must adhere to the following rules...", then your use of the Autonumber is no longer a good idea because you have *no control* over them. Then you will be forced into generating the 'numbers' in code, so you might as well do it from the beginning. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com