John W. Colby
jwcolby at colbyconsulting.com
Thu Sep 8 21:20:35 CDT 2005
My reason for not doing that is quite simple as I explained in a previous email. An autonumber being the PK is the only PK that makes sense <ducks>, but as soon as you place meaning on it, it will require changing. The problem becomes that you use the PK as an exposed number in 5 forms, 13 queries and 12 reports. Now the "suit" comes along and requires you change it to the letters in his daughter's name, scrambled, plus her birthday, minus his mother's maiden name. You now have to go add a field to hold this new construct, and then fix all those forms, reports and queries. Better, if you are going to expose the number, that you just add a field to the table right away, and then immediately (as each record / autonumber is created) copy the autonumber into this new field. Now if the "suit" makes this ridiculous order (and it WILL happen if you DON'T plan for it), you just alter the field data type, build the ridiculous order number generator and apply it to the already existing field. The field name remains the same, the queries, forms and reports continue to work. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings Sent: Thursday, September 08, 2005 11:46 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Autonumber Assigned Immediately I don't know why everyone is so adamant about no showing an autonumber. I agree technically they shouldn't be shown. But sometimes a simple solution is the best. For example, we currently have some contracts to 'digitize' a state required form for several local counties. Our solution to digitize is merely enter the data into a DB we created. However, the paper copies have to remain available. We number every form we put in so that the user can then search and find a paper copy by using the number generated by the software. Initially we did this using the autonumber and it worked perfectly (we had to abandon it to allow multiple entry persons for one county. It is a row identifier and therefore always points to the same set of data. If he wants to use it as an identifier let him. I have. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte > Foust > Sent: Thursday, September 08, 2005 10:31 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Autonumber Assigned Immediately > > > That doesn't make sense. If you have pull data in from other tables > and populated fields in a new record, the autonumber should have been > assigned, so there's something you aren't telling us. And as someone > else pointed out, the user should NEVER see the autonumber. It has no > meaning, it merely identifies a row, not the data in the row, and it > should not be treated as meaningful. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com