• Unique Document Number

    Author
    Topic
    #459379

    I would like to have Access to automatically generate a unique document number.
    Is it possible? How?
    Thanks in advance.
    Armstrong

    Viewing 0 reply threads
    Author
    Replies
    • #1158190

      Does the number have to conform to a specific format?

      • #1158192

        Does the number have to conform to a specific format?

        I’m sorry. It should read as follows:
        00001
        00002
        00003
        00004

        BTW, I’m just a beginner of Access.
        Thanks a lot.

        • #1158197

          The simplest solution is to add an AutoNumber field to the table and set its Format property to 00000. Access will automatically increase the value by 1 for each new record.

          Alternatively, you could use a Number field of size Long Integer and increment it using VBA code. You’ll find two approaches in [post=”287907″]Post 287907[/post].

          • #1158199

            The simplest solution is to add an AutoNumber field to the table and set its Format property to 00000. Access will automatically increase the value by 1 for each new record.

            Alternatively, you could use a Number field of size Long Integer and increment it using VBA code. You’ll find two approaches in [post=”287907″]Post 287907[/post].

            HansV,
            Thanks a lot.
            Armstrong

    Viewing 0 reply threads
    Reply To: Unique Document Number

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: