[AccessD] Autonumber Assigned Immediately

DWUTKA at marlow.com DWUTKA at marlow.com
Fri Sep 9 00:26:15 CDT 2005


Okay, who are you, and what did you do with JC?!?!?!?!?! Kidnapping is a
felony, but more importantly, so is computer fraud, so whoever you are, it's
been fun, but JC NEVER agrees with me, so you can just quit the act now!  ;)

Just kidding JC.  I have 2 systems in mind.  One is our online shopping
cart.  Initially, the 'Invoice Number' was the CartID (AN), with a few zeros
thrown in the front.  Before the system went live, however, it was announced
that the Invoice numbers had to be sequential for accounting reasons.  Okay,
no problem, I built the entire system with Classes, so it was a five minute
fix to switch the entire system to use a new table with sequential Invoice
Numbers.  The second system, is the ISFE (our IS request tracking system).
Just to have a 'ticket number', I give the user the autonumber.  Quick easy,
it's my system, so there are no rules, and honestly, if there are ever rules
applied (for whatever asinine reason), I won't be there! <grin>  Anyhow, in
case 1, I used an AN with no rules.  Rules we applied mid development.  AN
was dropped.  Lesson learned, use classes, because it makes your life a LOT
easier! ;)  In case 2, the Autonumber works perfectly.  Most of my other
systems use AN's for keys, but I have a more 'meaningful' key for the user
to see.

Drew

	-----Original Message-----
	From:	John W. Colby [SMTP:jwcolby at colbyconsulting.com]
	Sent:	Thursday, September 08, 2005 9:04 PM
	To:	'Access Developers discussion and problem solving'
	Subject:	Re: [AccessD] Autonumber Assigned Immediately

	OMG, I'm a gonna die.  Nothing in that whole message to disagree
with.  I
	prefer to not use my autonumber as a "case number" etc. but I will
in a
	pinch.  If the "suit" comes along and demands a "system" then I bill
them to
	replace the simple with the arcane.  If all they want is a unique
number to
	reference a piece of data with, well... I just happen to have an
autonumber
	already here.  I MIGHT be tempted to copy it out of the autonumber
field
	into it's own "case number" field just so the day that the "suit"
sticks his
	nose in I won't be modifying dozens of reports, queries and forms.

	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
DWUTKA at marlow.com
	Sent: Thursday, September 08, 2005 12:56 PM
	To: accessd at databaseadvisors.com
	Subject: Re: [AccessD] Autonumber Assigned Immediately


	I have driven a nail with a screwdriver.  Of course, when that is
the only
	tool you have, and you need to punch a nail out of something, then
it's
	either the screwdriver, or a part of your own body.  I'll go with
the
	screwdriver.

	As for the whole 'primary', 'natural', 'surrogate' key issue, I
agree with
	you Reuben, an Autonumber can do both tasks, being a primary key,
and a
	useful peice of data.  With one exception, if it acts as useful
data, there
	can be no rules other then it is to be unique placed on it.  For
example, if
	you need SEQUENTIAL Invoice Numbers, an Autonumber would not be
valid, but
	you may end up with non-sequential numbers.  If you just need a
unique
	'reference' number, then it is fine to use an Autonumber.

	Just my opinion though folks, and I'm sure I'm going to have
arguments
	thrown against me for it! ;)

	Drew

	-----Original Message-----
	From: Reuben Cummings [mailto:reuben at gfconsultants.com]
	Sent: Thursday, September 08, 2005 11:25 AM
	To: Access Developers discussion and problem solving
	Subject: Re: [AccessD] Autonumber Assigned Immediately


	You're correct Charlotte, but I've also NEVER seen a case where
autonumber
	6, for example, changed which row of data it is connected to.  It
always
	ID's the same row for life.  I have never agreed to the statement
that the
	data is separate from the autonumber - they ARE in the same row.

	IMO, the autonumber field is simply a way to create sequential
numbering
	without writing a bunch code to do so.  The fact that it can also be
the
	Primary Key is just an added benefit.  Why include two completely
unique
	numbers in a row if one will do two jobs?  I'm a big fan of
simplicity.

	This will lead to a ridiculous discussion - again - so I agree to
disagree
	;)

	BTW, Charlotte, because I have never driven a nail with a
screwdriver that
	method of driving nails is, in fact, NOT a valid method.  :)  I'll
let the
	list know if I ever do.  However, an adjustable wrench is
acceptable.

	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 11:04 AM
	> To: Access Developers discussion and problem solving
	> Subject: Re: [AccessD] Autonumber Assigned Immediately
	>
	>
	> No, it is a row identifier and therefore always points to the same

	> row, period.  The data in that row are entirely independent from
the 
	> autonumber, which is what leads to all the intense discussions of 
	> "primay key" vs "unique key" vs "surrogate key", etc.  The fact
that 
	> you have used it this way doesn't make it any more valid a usage.

	> After all, you can drive nails with a screwdriver too. ;->
	>
	> Charlotte Foust
	>
	>
	> -----Original Message-----
	> From: Reuben Cummings [mailto:reuben at gfconsultants.com]
	> Sent: Thursday, September 08, 2005 8: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
	> --
	> AccessD mailing list
	> AccessD at databaseadvisors.com 
	> http://databaseadvisors.com/mailman/listinfo/accessd
	> Website: http://www.databaseadvisors.com
	>




	-- 
	AccessD mailing list
	AccessD at databaseadvisors.com
	http://databaseadvisors.com/mailman/listinfo/accessd
	Website: http://www.databaseadvisors.com
	-- 
	AccessD mailing list
	AccessD at databaseadvisors.com
	http://databaseadvisors.com/mailman/listinfo/accessd
	Website: http://www.databaseadvisors.com



	-- 
	AccessD mailing list
	AccessD at databaseadvisors.com
	http://databaseadvisors.com/mailman/listinfo/accessd
	Website: http://www.databaseadvisors.com



More information about the AccessD mailing list