Adding a Autonumbering Field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database which is composed of data which is imported through Visual
Basic Script and then manipulated with many Queries. After a while I need to
have a field produce a running total, which i have figured out a formula for,
using DSum. However, I need a field of Autonumbered cells to Guarentee that
the data will add up correctly. Is there any way to create a query which will
create an autonumbering field in an existing table?
 
Hi,


We don't really need an autonumber to make a running sum, we just need a
field, f1, without duplicated values:


SELECT a.f1, SUM(b.f2)
FROM myTable as a INNER JOIN myTable as b ON a.f1 >= b.f1
GROUP BY a.f1



Hoping it may help,
Vanderghast, Access MVP
 
However, there in lies my problem. I do not have a field without duplicated
values. I have a date field, however there are rows with duplicated dates.
 
Hi,


You can then append the data to an empty table that has an autonumber field,
in addition to the other fields. Just append the existing fields, the
autonumber field will be filled automatically.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top