Give query results a number (1 Viewer)

COMP

Registered User.
Local time
Today, 09:28
Joined
Jul 20, 2009
Messages
61
Hi,

When i get the results from a query i want them to be numbered i.e 1,2,3etc. Is there a way of doing this??
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 17:28
Joined
Sep 12, 2006
Messages
15,715
not easily - because access has no concept of an order with a set of data

why do you need a sequential number
 

COMP

Registered User.
Local time
Today, 09:28
Joined
Jul 20, 2009
Messages
61
right ok - it is needed for when staff analyse it. Can it not be done on a report either?? when i create the query into a report is there no way of displaying the results with a sequential number??
 

khawar

AWF VIP
Local time
Today, 20:28
Joined
Oct 28, 2006
Messages
870
you can do this very easily in the report

creat a text box set its control source to =1
and set its running sum property to over group or over all
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:28
Joined
Feb 28, 2001
Messages
27,328
Just remember that the theory underlying the way Access works is SET theory, and as such, assumes that whatever you do should appear as though it all happened at once, i.e. to the entire set. Therefore, numbering is NOT an inherent part of the process. If you need numbering, remember that you are IMPOSING something artificial on the result. Which is also why it is so tricky to accomplish.
 

Atomic Shrimp

Humanoid lifeform
Local time
Today, 17:28
Joined
Jun 16, 2000
Messages
1,954
Also, if anything changes in the underlying data or criteria etc in the query, your next run will still be numbered, but the results will not be consistent with the first run.
 

Stemdriller

Registered User.
Local time
Today, 17:28
Joined
May 29, 2008
Messages
187
Did this ever get resolved. I have a similar need for the query results to be numbered, as they will go onto a mail merge. My query lists about 2000 or so i just wont to limit it to say 50 or 60 each time or >1 and <50

Gareth
 

Users who are viewing this thread

Top Bottom