Running sum major problem

  • Thread starter Thread starter Ticotion
  • Start date Start date
Hi

The material that the running sum is based on is not ordered as material; it
is a material number and not just a forthrunning number.
So if I understand you correct I need to have an autonumbering in my query
that tells access the order of the recordset. But this then generates a new
problem as I need to number the recordset. How can this then be done?

Ticotion
 
hi,
The material that the running sum is based on is not ordered as material; it
is a material number and not just a forthrunning number.
So if I understand you correct I need to have an autonumbering in my query
that tells access the order of the recordset. But this then generates a new
problem as I need to number the recordset. How can this then be done?
If you need an artifical "autonumber" then the running sum makes no
sense. Think about it.

If you only need the running sum for a report, take a look at the
running sum property of a TextBox.

How to generate a running number in a query over an identity field:

SELECT (SELECT Count(*)
FROM [yourTable] I
WHERE I.ID <= O.ID) AS [AutoNumber],
O.*
FROM [yourTable] O

But still the same problem here: you need to order the recordset.


mfG
--> stefan <--
 
Hi Stefan

I work it out!.

I made a Temp table Where I put my data sorted på VolPct. Then I put in an
autonumber in the table and ran the runningsum on this.
I have then made a delete query and append query when I need to update data.
Doing it like this I always get a sorted recordset with an unique number.

Thank you for all your help

Ticotion
 
Back
Top