define 'autonumber' - do you mean you want a count of refno's <=to the refno in the current record of the query (i.e. starting from 1)? or something else?
if it is the simple count then something like
SELECT entrydate, refno, (select count(*) from mytable T where refno<=mytable.refno) as auton
FROM mytable
ORDER BY refno
Thank you again, I think I was not clear in the first place but I found the query I was looking in this forum. " RowNumber"
I will close this post now.