Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    next number (Accesss 97)

    I have a field that is format number. I have it jump to the next number in my code. Is there a way that I can force the field to start at a number? The current number is 24560 and I want the next number to start 24600?

    Worst case... How can I reset the number to start at 1

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: next number (Accesss 97)

    You are going to have to be a little more specific in describing your situation and your request. Is this some sort of ID#, like Invoice numbers, etc.? Are these numbers assigned to new records?

    I'm assuming the answer to these questions is "yes", and I'll explain how I would do it. First of all, I'd determine the next ID# as the last step in my form's BeforeUpdate event, using a simple line of code like this:

    [tab[Me.ID = nz( dmax("id","mytable"),0) + 1

    To start numbering at a higher number, I'd add this line of code:

    if Me.ID < 24600 then me.ID = 24600
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: next number (Accesss 97)

    I just some more information on this. What is/was happening is that a new data entry is made... They have a VB script that check the last recorded entered and like you example it will +1 to it.

    I also found the problem and fixed. Their database was corrupted just enough so that the Record field was not entering the numbers. That is now fixed and working...

    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •