• Adding a new reference number to a form (Access 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Adding a new reference number to a form (Access 2003)

    Author
    Topic
    #433904

    Hello all!

    I have a database containing several records, all with a reference number. What I need to do is when a new record is created, create a new reference number based on the last reference number.

    For example, the last reference number would be ST06043, the new record reference number would be ST06044. Is there any way to do this automatically when the ‘add record’ button is clicked? I’m afraid I have no knowledge/experience of Access VBA whatsoever so any and all assistance would be gratefully accepted.

    Thanks!

    Viewing 0 reply threads
    Author
    Replies
    • #1021798

      If all reference numbers are to begin with “ST”, I would use a number field, and prefix it with “ST” whenever needed in a form or report. You can then use one of the methods described in post 287,907 (with, of course, the appropriate names substituted).

      • #1021801

        hello Hans

        Thanks, I’ll give it a try (though to be honest don’t hold out much hope as my ‘expertise’ in this area is near-as-dammit zero!). If it works I’ll send you a giftwrapped [choccybar]…

        thankyou

    Viewing 0 reply threads
    Reply To: Adding a new reference number to a form (Access 2003)

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

    Your information: