Hi, basically i have a form for making new users on our system and at first I used the access default system for subforms, where the Primary Key field shows (New) until something is entered into another field in the form and it automatically then creates said new record.
My problem is that more than one user uses this form and if two people use the 'new record' button and overlap then they try to both take the same primary key ID.
Originally I had a system that scanned all records, then (via VBA) changed the master link field to RecordCount +1 and after that it would setfocus to a field in the subform and automatically add that record to the database, it's a little wasteful but it worked, until now.
Now we're having the same issue where two frontends are trying to create seperate records under the same Primary Key, ID.
Is there ANY way to catch the error in the VBA and have it add 1 to the primary key field instead of just crashing out?
My problem is that more than one user uses this form and if two people use the 'new record' button and overlap then they try to both take the same primary key ID.
Originally I had a system that scanned all records, then (via VBA) changed the master link field to RecordCount +1 and after that it would setfocus to a field in the subform and automatically add that record to the database, it's a little wasteful but it worked, until now.
Now we're having the same issue where two frontends are trying to create seperate records under the same Primary Key, ID.
Is there ANY way to catch the error in the VBA and have it add 1 to the primary key field instead of just crashing out?