Simon,
if you simply need to know how many records you exported, you can count them
by using a DCount on the query or recordset before you export it.
If you want each line numbered, you can number it in the query before you
export it like this:
The Table is the name of a table in your query and field1 is the name of a
field in the table, which is a field that doesn't contain nulls.
SELECT TheTable.Field1, (SELECT Count(*) FROM TheTable As X WHERE X.Field1<=
TheTable.Field1) AS Rank
FROM TheTable
WHERE (((TheTable.Field1) Is Not Null))
ORDER BY TheTable.Field1;
You'll have to explain a bit better. Are you exporting from Access to Excel?
vice versa? Why can't you just use a totals query to count records rather than
inserting a (redundant??) line number in every record?
I had a field that show line number of record, when input record the 1st and
the last customer name are not in sequence, but line number field will in
sequence. when we sort customer name in ascending order, line number will not
follow as in ascending order.
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.