Hi there
Just had a go and understand how it works. Problem is that I am only selecting random records from the tbl_orders. As I dont want the first record the sequence is starting at number 2 . If I dont select the 4th record then the sequence is 1 , 2 , 3 , 5 and so on.
Hope this makes sense. Its as if I need to assign a unique number once the selected data has been transfered to the result table rather than before.
Thanks for your help
Ok, you are correct. I did not realize you were picking random records. But, you can do the same thing with a text field as long as it is unique within the query. For example, if customerName is unique within the query.
SELECT DCount("customerName ", "tbl_orders"," customerName <=’” & [customerName] & "'") AS Sequence, ordernumber, customerName
FROM tbl_orders
ORDER BY tbl_orders. customerName;