Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Location
    New Hampshire
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    To Auto or Not? (XP)

    I am updating a '97 application to XP. For several reasons, I'm creating a whole new application. For billing and accounting purposes, I need to retain the original Company ID numbers (253 records range in IDs from 1000 to 4256, all 4-digit numbers).

    I want my new "Companies" form to have a field, "Account Number." If the company has an existing Company ID, the Account Number should equal that existing Company ID.

    Using Helen Feddema's technique, I'm able to insert a new "Auto ID" field in the Companies table that auto-increments new, 4-digit IDs for new companies.

    Now, on my "Companies" form, I want the "Account Number" field to reflect the number in the Company ID field (imported from the previous application), when such a number exists. Then, when the Company ID field is blank (empty, null) I want the Account Number field to reflect the new, 4-digit AutoID that my new application auto-increments.

    How do I make this happen.

  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: To Auto or Not? (XP)

    If you import your old Companies into your new Company table, your old Company # will be in the new Company # autonumber field. Autonumbering will pickup with the next # after your largest existing #.

    That being said, I am always a little wary of using autonumber fields when that field is going to be made known to the user. Once a number has been assigned, it can't be changed; and frequently it raises concerns when users find gaps in the numbering.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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