autonumber column

N

Natasha

thanks for your time and your help:
I run append query to move data into the table which has
autonumber field, I have to do it constantly. RecordID
(autonumber field) never starts from 1, it goes to the
next number after I trancated the table. I tried to alter
table drop column RecordID and rebuild this column again,
I had error message, it does not delete autonumber column
and I can not create new column:
ALTER table Employees ADD COLUMN RecordID AUTOINDEX.

How can I create counter in the field to count records
when i run append query to move data from one table to
another

Thnaks
 
K

Kevin Sprinkel

How can I create counter in the field to count records
when i run append query to move data from one table to
another

If your only interest is the number of records in your
table(s), you can use a Totals Query. Drag your key field
to the Query Design Grid and select View, Totals from the
drop-down menu to enter Totals mode.

In the Total: row, select Count from the combo box.

You can also determine it programmatically with the VBA
DCount function, e.g.,

DCount("[OrderID]", "Orders", "[ShipRegion] = 'CA'")

HTH
Kevin Sprinkel
Becker & Frondorf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top