append query to a table with autonumber

  • Thread starter Thread starter Rob Guest
  • Start date Start date
R

Rob Guest

Could someone tell me if there is a way to use an append
query to enter data into a table where there is a
autonumber field. The autonumber field is used as a key
field and has relationships to many other fields.
 
Hi



Yes, just specify its name, and its value.


INSERT INTO myTable( autonumberName, ... ) VALUES( valueForAutoNum, ... )




Remember that an autonumber, alone, is not a guarantee that there is NO
DUPLICATED value. You have to add an index, or a pk, to add that constraint.



Hoping it may help
Vanderghast, Access MVP
 
Could someone tell me if there is a way to use an append
query to enter data into a table where there is a
autonumber field. The autonumber field is used as a key
field and has relationships to many other fields.

Just to add to Michel's comments - if the Append query appends any
value to the Autonumber, that value will be inserted into the
autonumber field (provided it's a Long Integer datatype and doesn't
violate any unique indexes); if on the other hand you append other
fields but not the autonumber, the autonumber will increment normally.
 
Back
Top