Dear all,
I have created an index in a table, which specifies that the fields [DateWorked] and [StaffName] cannot be duplicated. This is within the tblTimesheets table.
Now I need to program an error message that is displayed instead of the standard error 3202. I am using this code on the form's OnError event:
Code:
Sub|Function TimesheetError()
On Error GoTo Err_TimesheetError
Err_TimesheetError:
MsgBox (That date has already been entered for this staff member!)
Resume Exit_TimesheetError
End Sub|Function
However, I'd like it to use code on the BeforeUpdate property of the DateWorked field and code that suppresses the error 3202.
Many thanks!