


First question is, should the id field be auto number or text data type? Second question is how do I code the button to first of all to link to the field so when I click on it, it will auto generate the id( the id field name is "uniqueid"), and third, how do I code the button to auto generate the unique id. Then I have an Id field with an auto generate button I have created right next to the field. Then I have the date which is automatically put in with the function "Date()" in default value. The model is a combo box with options the user chooses. I have a form with three fields, which are I have posted before but my after talking to my manager we have come up with a format with a unique id that he wants me to auto generate. Does anybody know how to code this to a button which is linked to the unique id field on the form that when I click it, it will automatically generate the id for the user, and when a user puts in a new form, it will automatically increment again, or when creating a new record the id automatically increments. Then I want both Id's to increment by 001 to 002 to 003 and so on, while EMR, GT and the year stay the same. EMR and GT are abbreviations for the form the employee is using and 16 is the current year, and 001 or just numbers my boss has given me. The format of the ID for two out of the three forms that I have created have to be "EMR-16-001" and "GT-16-001". I do not have knowledge on vba and looking for some help if somebody can post some code, that would be really appreciated. I have a project at work and my manager wants to me create a unique id that when employees use the form on access to fill out a request we do not have to assign them an ID, access will already assign them an ID with a click of a button assigned to a Unique ID field on a form or when creating a new record on a form, which will then automatically go on to the next Id.
