record numbers

G

Guest

I ahve a need to do thefollowing:

When I retrieve records in a query, i need a field within the query that is
the current record number retrieved (of the query not of any of the
underlying tables),,, ie if 10 records are retrieved i need a field that
says it is record nubmer x of the records retrieved. helppppppp
 
J

JohnFol

A query just sorts / filters / collates data.When you present it, it's done
via a form or report and that's where the sequence number is best displayed.

If you need it in a query, for example you are exporting the data, use a
dcount. Try this in NWind to demonstrate

SELECT Customers.CompanyName, Customers.CustomerID,
DCount("*","Customers","CustomerID<='" & [CustomerID] & "'") AS Expr1
FROM Customers;


PS if the field you use for the Order By is numeric, remove the additional
quotes
 

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

Top