Results 1 to 10 of 10

Thread: Forms (03)

  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forms (03)

    I have a form that writes back to a table. Within the form I have a command button that adds a new record to the table.

    My challenge is with the auto-numbering of the primary key ie field name "ID". The next number in the field "ID" should be 44 but displays 43586099. The total number of records is 44.

    Any ideas as to why?

    Thanks,
    John

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Forms (03)

    Maybe the autonumbering has been set to random.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms (03)

    In addition to patt's reply: an AutoNumber field has a property New Values. It can be set to Sequence or to Random. If it is set to Sequence, the autonumbers should be assigned in sequential order.

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms (03)

    I checked the AutoNumber field property New Values and I only have two options: Increment or Random. It makes sense that the property be set to Sequence but that is not an option to select.

    To resolve the issue I removed the primary key of the "Id" field and change the property to "number". Then created a new field, changed the value to AutoNumber and deleted the field "Id" which was giving me the problem.

    Thanks,
    John

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Forms (03)

    Glad you solved your problem.

    The option that Hans made was Sequence, what he meant was Increment, they are one and the same.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms (03)

    As patt noted, I should have mentioned Increment instead of Sequence. When you create a new AutoNumber field, the New Values property is set to Increment by default.

  7. #7
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms (03)

    Upon further investigation, there appears to be a bug in the autonumbering sequence.

    Regards,
    John

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms (03)

    True, but you reported a value of 43586099. Have there really been 43586099 records in the lifetime of this table?

  9. #9
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms (03)

    Hans,

    The table records were under 1,000. Then one day the autonumbering jumped for no apparent reason.

    Regards,
    John

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms (03)

    I cannot explain that, but it is different from the problem described in the MSKB article - that says that compacting and repairing a database doesn't reset the AutoNumber seed to 1 higher than the highest current value, instead it just continues from where it left off, even if you remove some or all records with the highest AutoNumber values.
    I suppose it was "just" a glitch, not something structural.

Posting Permissions

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