Hi
I am already using this code to create a new record. This works fine BUT if 2 people try create a record at the same time, an error occurs as the EmpRegNo is the same...
How would i check if record is in the EDIt state OR how do I work round this???
Thx
Darin
I am already using this code to create a new record. This works fine BUT if 2 people try create a record at the same time, an error occurs as the EmpRegNo is the same...
Code:
Private Sub cmdNewRec_Click()
Dim VarEmpReg As Integer
VarEmpReg = Nz(DMax("[EmpRegNo]", "tblEmployee")) + 1
DoCmd.GoToRecord , , acNewRec
Me.EmpRegNo = VarEmpReg
Me.EmpRegDate.SetFocus
Forms!frmEmpRead!EmpMemoChanges = "NEW EMPLOYEE STARTED BY - " & Forms!frmSwitchboard!tName & " - " & Now()
End Sub
How would i check if record is in the EDIt state OR how do I work round this???
Thx
Darin