I hope I am posting this in the correct location, but here goes. This access issue has been troubling me for a while and I have yet to find a viable solution anywhere on the net.
I have an Access DB that is split in two (front end and back end). The primary key for my table, called Notice, is set to number, however in the form I have this function: DMax("[NoticeID]","[tblNotice]")+1
This essentially allows me to use autonumber without actually using the autonumber data type (which I would rather avoid using). So anytime a user opens the form, the next available NoticeID is assigned.
The problem I am having is when two people have the front end DB open, and navigate to a blank entry in the form to fill they are both assigned the same NoticeID. When one user eventually saves before the other, it writes that notice to the table. However when the second user tries to save the record, the form spits out an error that you cant have duplicate primary keys.
I have tried to use a requery macro in the BeforeUpdate event for the form and the NoticeID field however I haven't had any luck. Any help on this would be appreciated.
Thanks,
Zack