Give query results a number

COMP

Registered User.
Local time
Today, 07:07
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??
 
not easily - because access has no concept of an order with a set of data

why do you need a sequential number
 
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??
 
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
 
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.
 
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.
 
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

Back
Top Bottom