apollo7
asked on
Microsoft Access - Increment Number Using Update Query
I need to run an update to increment an ID number, starting at a certain value and adding 1 for each record.
Currently I have a separate table (named fCallID) that contains the starting number in a field called newCallID. The current value is 131200
I need to update the CallID field in the fCalls table. The CallID field is blank for all 50000 records. I want to start with the newCallID value of 131200 and add 1 for every CallID in the fCalls table.
I want to run this one time from a query. Note: the primary key of fCalls is mid.
Thanks
Currently I have a separate table (named fCallID) that contains the starting number in a field called newCallID. The current value is 131200
I need to update the CallID field in the fCalls table. The CallID field is blank for all 50000 records. I want to start with the newCallID value of 131200 and add 1 for every CallID in the fCalls table.
I want to run this one time from a query. Note: the primary key of fCalls is mid.
Thanks
ASKER
Thanks for the quick response.
Can you explain how to do this (from your post):
<<You could place this code in a module as a public Sub and run it from the immediate window>>.
I am familar with creating a function in a module and calling it from a query but I am not sure what you mean by the above. Can you give me instructions on how to do this?
Thanks again.
Can you explain how to do this (from your post):
<<You could place this code in a module as a public Sub and run it from the immediate window>>.
I am familar with creating a function in a module and calling it from a query but I am not sure what you mean by the above. Can you give me instructions on how to do this?
Thanks again.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is your CallID field has an AutoNumber format?
Ed
Ed
ASKER
Thanks very much for the help
You could place this code in a module as a public Sub and run it from the immediate window.
Open in new window