Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   MS Access - Long Term Varialbe? (https://www.askmehelpdesk.com/showthread.php?t=10617)

  • Jun 28, 2005, 06:54 AM
    andy5179
    MS Access - Long Term Varialbe?
    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.
  • Jun 28, 2005, 07:12 AM
    ScottGem
    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.
  • Jun 28, 2005, 07:14 AM
    andy5179
    Can I just use a query to update the field? Its still a little fuzzy.
  • Jun 28, 2005, 07:24 AM
    andy5179
    But when the number gets to 899, I need the next one to reset at 800. How can I accomplish this?
  • Jun 28, 2005, 11:48 AM
    ScottGem
    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.

  • All times are GMT -7. The time now is 01:23 PM.