Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Location
    Raleigh, NC
    Posts
    146

    Unanswered: Autonumber Question

    I'm creating a field that deals with an account number. The account numbers will follow the format C123456, where C is a constant in all numbers and "123456" is an AutoNumber.. of course starting at 000001. How would I enter this into the "Format" property so that I get "C000001", "C000002", etc etc.? I have tried "\C000000" in the format and it looks fine in table:datasheet, but it does not appear correctly on the form.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    use an ordinary autoincrement column, and always select it like this:

    select 'C'+right(string(5,'0')+autoincr),6) as accountno from ...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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