display sequential list of numbers

  • Thread starter Thread starter Brian Kaplan
  • Start date Start date
B

Brian Kaplan

Hi, I have a query and I would like a column to present a
sequential list of numbers (1,2,3 ... and so on). Is there
a way to do this. I could use the ID number if that is
okay. Thanks
 
Hi, I have a query and I would like a column to present a
sequential list of numbers (1,2,3 ... and so on). Is there
a way to do this. I could use the ID number if that is
okay. Thanks

The ID number, if it's an autonumber, won't likely be 1, 2, 3 - unless
you are only ever displaying the same set of records.

This is very easy on a Report; just put a textbox on the report with a
Control SOurce of 1 (the number one) and set its RunningSum property
to True.

On a Form or query you'll need to have a field in the query which is
strictly ascending; you can then put in a calculated field

DCount("*", "[your-query-name]", "[sortfield] <= " & [sortfield])
 
-----Original Message-----
Hi, I have a query and I would like a column to present a
sequential list of numbers (1,2,3 ... and so on). Is there
a way to do this. I could use the ID number if that is
okay. Thanks

The ID number, if it's an autonumber, won't likely be 1, 2, 3 - unless
you are only ever displaying the same set of records.

This is very easy on a Report; just put a textbox on the report with a
Control SOurce of 1 (the number one) and set its RunningSum property
to True.

On a Form or query you'll need to have a field in the query which is
strictly ascending; you can then put in a calculated field

DCount("*", "[your-query-name]", "[sortfield] <= " & [sortfield])


.
Thanks John. The DCount command worked but was very slow
on my computer. I ended up exporting the query to a xls
file and importing it back in. The importing inserted an
ID field. Thanks again. Brian Kaplan (e-mail address removed)
 
Back
Top