Runing Record Count (1 Viewer)

feebert

Registered User.
Local time
Today, 16:07
Joined
Jan 7, 2003
Messages
24
I am trying to run a query with a record count in one column.

example

order record
123 1
156 2
558 3

and so on...


Can anyone help

Thanks!
 

Rob.Mills

Registered User.
Local time
Today, 11:07
Joined
Aug 29, 2002
Messages
871
I assume the first column contains the Order ID, yes?

What does the 2nd column suppose to count?
 

feebert

Registered User.
Local time
Today, 16:07
Joined
Jan 7, 2003
Messages
24
Rob.Mills

It just looks a little funny, but the order number is 123 and i want 1 in the next column

The second column is the record count

order
123
188
588

record
1
2
3

It supposed to count the records.
like record 1, next record will be record 2 and so on.

Basically I want a running total of records in the second column. I just need some help writing the expression.

Thanks in advance
 
Last edited:

Rob.Mills

Registered User.
Local time
Today, 11:07
Joined
Aug 29, 2002
Messages
871
Is there an ID field? If so you can create a running sum. But you would need to add another field to the table. It would need to be a number field with default value = 1.

Make sure all of them have a 1 in that field. Then with your query sorting on the ID field create this expression:

DSum("[New field with 1 in it]","[Table Name]","[ID field]<=" & [ID Field])
 

Users who are viewing this thread

Top Bottom