Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: Access virgin using current date as primary key in serial number format

    Hi, i am VERY new to access and i want to create a table that uses the current date as its primary key for each new record with a sequential number appendix.
    i.e. current date 03/25/2004, display as 38072-01, 38072-02,38072-03, 38072-04 etc...
    i have searched the help files and internet for help for several hours now and have gotten no where.
    Can anyone help me? thx for your time in advance!
    Last edited by WWIII; 03-26-04 at 12:05.

  2. #2
    Join Date
    Mar 2004
    Posts
    77
    how 'bout changing it to 20042503 or 200403-25 when the date is 03/25/2004?

  3. #3
    Join Date
    Mar 2004
    Posts
    3
    chanjw,

    While that is an option this is for a manufacturer and we would prefer that the number not be easily recognized as a date. the examples i used are from excel where it is very easy to achieve this result.
    i have tried using the expression builder and i can get it to show current date but not in serial format, plus i need to add the appendage number (consecutive numbers starting with -1, -2, -3 etc...)

    thx for your input

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by WWIII
    chanjw,

    While that is an option this is for a manufacturer and we would prefer that the number not be easily recognized as a date. the examples i used are from excel where it is very easy to achieve this result.
    i have tried using the expression builder and i can get it to show current date but not in serial format, plus i need to add the appendage number (consecutive numbers starting with -1, -2, -3 etc...)

    thx for your input
    Does the Serial # need to be sequential for each date?

  5. #5
    Join Date
    Mar 2004
    Posts
    3
    M Owen,

    yes serial # needs to be sequential for each date, in the example i gave above the sn 38072-01 represents actual date in sn format with the appendix-01.
    this is directly from an excel sheet that converts current date to sn and adds the sequential appendix.

    we manufacture bird food and need to track product. the serial number date records the date of production the appendix is a "batch" number.

    so in the original example on 03/25/2004 (38072) we made 10 "batches"
    hence 38072-01,38702-02,38072-03....38072-10.

    would like for this to be an auto fill field that acts as primary key

    Thx

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by WWIII
    M Owen,

    yes serial # needs to be sequential for each date, in the example i gave above the sn 38072-01 represents actual date in sn format with the appendix-01.
    this is directly from an excel sheet that converts current date to sn and adds the sequential appendix.

    we manufacture bird food and need to track product. the serial number date records the date of production the appendix is a "batch" number.

    so in the original example on 03/25/2004 (38072) we made 10 "batches"
    hence 38072-01,38702-02,38072-03....38072-10.

    would like for this to be an auto fill field that acts as primary key

    Thx
    Well you won't be able to make it autofill (autonumber) ... I saw another posting on this type of request recently (within last 2 weeks) ... Try doing a search on autonumber.

  7. #7
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    This isn't a problem to do, but you are going to have to be responsible for creating this field every time a new record is created.

    You say it is very easy in Excel. Tell us what you are doing in Excel and maybe we can replicate this functionality.

Posting Permissions

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