How do I autom. display/retreive of LINE numbers in Query column ?

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

Guest

HI,

I have two colums in my Query,

Column A is
Autonumbers

ID
1
2
4

column B SHOULD be the LINE or ROW number

Lines:
1
2
3
respectively...

WHAT IS THE FUNCTION IN ACCESS QUERY to retreive those line numbers,
1, 2, 3 automaticaly...

[Under Excel it is something like; line()]

THANKS.
 
Hi ACCESSWEB,

See the following Knowledge Base article:

How to Simulate a Dynamic Counter in a Table or a Query to Count Records
http://support.microsoft.com/?id=199679


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

HI,

I have two colums in my Query,

Column A is
Autonumbers

ID
1
2
4

column B SHOULD be the LINE or ROW number

Lines:
1
2
3
respectively...

WHAT IS THE FUNCTION IN ACCESS QUERY to retreive those line numbers,
1, 2, 3 automaticaly...

[Under Excel it is something like; line()]

THANKS.
 
column B SHOULD be the LINE or ROW number

Lines:
1
2
3
respectively...

WHAT IS THE FUNCTION IN ACCESS QUERY to retreive those line numbers,
1, 2, 3 automaticaly...

[Under Excel it is something like; line()]

Excel is a spreadsheet - a good one - and it has line numbers and
column letters.

A realtional query may *look* like a spreadsheet but it ISN'T one.
There is no builtin line number feature. Consider that (unlike a
static spreadsheet) that a query is dynamic; changing one criterion or
one data value could completely change ALL the row numbers.

You can easily put row numbers on a printed Report by adding a textbox
in the Report with a Control Source of 1 (just the number one) and
setting its Running Sum property to "Over All".

If you need to *display* a row count onscreen, you can use a
calculated field

RowNum: DCount("*", "[YourQueryName]", "[ColumnA] <= " & [ColumnA])

using your own query and fieldnames of course.

John W. Vinson[MVP]
 

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

Back
Top