View Full Version : MS Access - Long Term Varialbe?
andy5179
Jun 28, 2005, 06:54 AM
I set up users in a database on a daily basis. There has been a recent change where I need to assign each of them to a number between 800 and 899, in sequential order. How can I do this, using VB or ACCESS, so that the variable isn't lost when the application is closed? In other words, if I add a user today and it's assigned 820, when I close the program, and reopen it tomorrow, I need it to pick up where it left off with 821 as the next assigned number.
ScottGem
Jun 28, 2005, 07:12 AM
The assigned number should be stored as a field in a record. You can use the DMAX function to pull the last assigned number and increment by one.
andy5179
Jun 28, 2005, 07:14 AM
Can I just use a query to update the field? Its still a little fuzzy.
andy5179
Jun 28, 2005, 07:24 AM
But when the number gets to 899, I need the next one to reset at 800. How can I accomplish this?
ScottGem
Jun 28, 2005, 11:48 AM
Why would you need to reset? What is the purpose of this number? It can be done, but I'd like to understand more about the application first.