Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Location
    Somewhere on the 3rd Rock
    Posts
    93

    Question Unanswered: Report Number Format

    I need to setup a Report number that looks like this

    06-00000001

    The first two numbers represent the year, while the other 8 numbers will need to increase by one each time a new entry is input.

    I have the input mask setup for this format, However I am not sure on the coding. I know the Year format part should be YY- or something like that.

    Any suggestions?
    Will Dove
    working hard is better then hardly working ...

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487

    Sample-CRI005

    Here is a sample of one way you can do this. Look at the table structure and the code within the Form module.

    .
    Attached Files Attached Files
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    Dec 2005
    Location
    Somewhere on the 3rd Rock
    Posts
    93

    Thank you

    That is great, I only have one more questions. Is there a way to reset the increment to 00000001 when the new year starts, i.e....

    06-00123456
    07-00000001
    07-00000002
    08-00000001
    etc...etc...etc...

    The sample is great.
    Will Dove
    working hard is better then hardly working ...

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    Since the entry years will always advance you need to add only one line of code. Place it directly above the line the states: TmpNum = TmpNum + 1

    If Val(Left$(RecNum, 2)) < Val(Format(Date, "yy")) Then TmpNum = 0

    You can now also see this additionally requested feature within the updated Sample below.

    .
    Attached Files Attached Files
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  5. #5
    Join Date
    Dec 2005
    Location
    Somewhere on the 3rd Rock
    Posts
    93

    Thanks

    it is working great. thanks for the assistance.
    Will Dove
    working hard is better then hardly working ...

Posting Permissions

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