Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2003
    Posts
    45

    Unanswered: Formated AutoNumber Fieled

    How can I create a field that increment by one evry time a new record enterd, and has a format of 0000,0001,0002......00111,00112...99999?

  2. #2
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238

    Re: Formated AutoNumber Fieled

    Originally posted by koko
    How can I create a field that increment by one evry time a new record enterd, and has a format of 0000,0001,0002......00111,00112...99999?
    You can use the format command on the field. For example

    Format([MyAutoNumberField], "0000")

    You can use this in a SQL statement or on a Form or Report

  3. #3
    Join Date
    Oct 2003
    Posts
    45

    AutoNumber

    Thanks For your reply,
    But, How can I use It in a form I tried but it did not work with me??

  4. #4
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    First one question, that field is field that you want store in a record set or not.
    If is a field of the record set you can define as autonumeric with format
    like tell you justin_tighe but in the design of the table:
    Format 0000
    This can work depent of your problem....
    Saludos
    Norberto

  5. #5
    Join Date
    Oct 2003
    Posts
    45
    what do you mean by Store as A "Record Set"?and how it differ?

  6. #6
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    A field only for memory, not for store in a table.
    Saludos
    Norberto

  7. #7
    Join Date
    Oct 2003
    Posts
    45

    Re: Formated AutoNumber Fieled

    how can I Use the AutoNumber Until the end of the year, and it will reset to 0 for the new year?

  8. #8
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238

    Re: Formated AutoNumber Fieled

    Originally posted by koko
    how can I Use the AutoNumber Until the end of the year, and it will reset to 0 for the new year?
    To apply the format use the format property of the control and just type in 000000 - this will format that control. If you press F1 when on the format property you will get help on the all the format commands you can type in.

    to reset an auto number you need to use an insert query to insert a new record forcing in the number you want. If your autonumber is the primary key or is an unique index you wont be able to do this as you cannot have duplicate numbers

Posting Permissions

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