Auto-incrementing the number field

Viewing 2 reply threads
  • Author
    Posts
  • March 23, 2014 at 1:31 PM #9488

    rjmorita
    Participant

    If I have an auto-incrementing field in a new form from the start, it works just fine. Every time I add a new record, the number gets incremented by one.

    But if I were to add an auto-incrementing field to an already existing form, I still have to manually enter the number when I modify records that are already there.

    That is not a problem until I try to add a new record. The program automatically puts “2” in the number field instead of adding one to the last sequence# I used.

    For example, if there are already 20 records in a file and I number them from 1 to 20 manually, then it seems like the new record I create should come up with 21.

    Or perhaps, I’m asking too much.

    Thank you, Brendan.

    March 23, 2014 at 4:42 PM #9492

    Brendan
    Keymaster

    Hi RJ,

    It’s because the Default Value gets incremented each time you add a new record. That’s where I store the last value. Just set the Default Value on your Number field to be the last value added. Then it will increment up from there.

    Thanks!

    Brendan

    March 23, 2014 at 8:05 PM #9493

    rjmorita
    Participant

    So that’s how it works. Thank you.

Viewing 2 reply threads

You must be logged in to reply to this topic.