Question : Autonumber in query

Please see:
     http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20262667.html

In JDettman's solution, is varName what's to be initialized to 0?  Can    be  ANY column in the query?

I get unpredictable results. The autonumber column contains "2" in row 1, and "4418" in row 2.  Row 3 contains "4419", but the sequence does not hold.

Answer : Autonumber in query


is this empty table have an autonumber field?
in design view of the table
delete the autonumber field
close table
do a compact and repair  (from access window Tools>Database utilities > Compact and repair database )

now append your data to the table,
in design view of the table add an autonumber field

is the sort order good?

if unsuccesful do this

create a new table without the autonumber field.
append your data to this new table.
view the new table , if sort order is correct,
place the new table to design view
add a autonumber field
see if the result is still in order
Random Solutions  
 
programming4us programming4us