Automatic Alphanumeric Increment field

jeudi 5 mars 2015

Hi all,



I've been working on an Access database for my boss and quite frankly it's startin' to drive me up the bally wall ><



I've got most of what he wants sorted but this last task I am completely flummoxed. All of his projects are allocated an ID (named Project Reference), starting from P010010 and increasing by 1 each time. I've made a form that allows a new project to be recorded by entering all the details and hitting the 'record' button, but he wants the Project Reference field to be automatically filled in each time (understandably), increasing by 1 from the last record.



So if the last record was P010311, then when the form opens the Project Reference should automatically be P010312.



I've looked into this and found many guides talking about DMax and DIM and strCriteria and whatnot, but no matter how many of them I follow and try to adapt to my own database I can't get it to work at all. Could somebody PLEASE help me to figure this out?



The table the ID comes from is called General, and the field is Project Reference. The ID should automatically be filled into a text box called txtRef whenever the form opens and a button to add a new record is pressed, being 1 higher than the previous ID.



:banghead: <--- Me right now

Automatic Alphanumeric Increment field

0 commentaires:

Enregistrer un commentaire

Labels