I need to be able to asign a record number to a query for example if I do a make table query, witch adds 10 records how could I assign the number 1 through 10 to a field in that table.
Thanks
I need to be able to asign a record number to a query for example if I do a make table query, witch adds 10 records how could I assign the number 1 through 10 to a field in that table.
Thanks
I usually use DAO to do things like that. Since you are using a MAKE TABLE, maybe you can have a Boolean with default value -1. After the MAKE TABLE run's you can go back over it with the DAO and increment an integer variable using a loop. If multiple users, you may need a column to store an unique session ID to verify the DAO is retrieving the correct records.
maybe someone knows a better way to increment or a property setting at the table level....
I have seen several methods, but don't remember exactly how to create the query and I don't have all of reference sites available.
If you sort the data on MyField (Ascending) you could use something like...
Also, look at Roger's Access Library site:Code:Counter:(SELECT COUNT(*) FROM MyTable AS T WHERE T.MyField <= MyTable.MyField)
NumberedQuery.mdb (beginner)
http://www.rogersaccesslibrary.com/forum/topic309.html