Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Feb 2009
    Location
    Evanston, Illinois, USA
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    autonumber field (2000)

    Is there any way to format an autonumber field type? I want to use this field to auto-generate invoice numbers. But, once I declare a field of this type, it seems to only want to let me start with 1, 2, 3, etc. My client has existing invoice numbers and formats and wants to start with S-1000000, and then S-1000001,
    S-1000002, and so on. I cant see any way to do this with autonumber, but I want to avoid having to enter invoice numbers manually in a text field. Or is the only other way to write some code that will generate the numbers for me, and how would that work? Thanks for any help.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autonumber field (2000)

    Don't use an autonumber for numbering invoices.
    If you decide to cancel an invoice after you begin to enter one, the number will be loosed and the sequence of your numbering will be broken.
    Generate your own numbering for this.

    Francois
    Francois

  3. #3
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: autonumber field (2000)

    You can start autonumbering by creating a table with a given number and then changing the type to autonumber. Prefixes can be assigned in a separate field on display in forms and reports through concatenation, but Francois is correct, aborting record creation will cause essentially unrecoverable gaps in invoice numbers. More importantly, should you ever consider "replication" autonumbers will become totally unmanageable. Better to create invoice numbers through code. There are a number of threads here in the lounge that discuss just this situation.

Posting Permissions

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