D
Duane
I have a sub form that has a field (Reason - combo box) linked to another
table. If a user doesn't enter a value in the combo box field, they receive
an error stating "You cannot add or change a record because a related
recordis required in table tblReason".
I would like to change the error messege but I am having trouble trying to
figure out where to trap the error. I have triend the Before Update and On
Error events of both the form and sub form, but I am still receiving the
standard Access run-time error.
Here is the code I am trying to use.
On Error GoTo Error_Handler
Exit_Procedure:
Exit Sub
Error_Handler:
If Err = 3201 Then
MsgBox "You must select a Reason from the drop down menu!"
Else
MsgBox "Error " & Err.Number & ": " & Err.Description
End If
Resume Exit_Procedure
Any help would be appreciated. Thanks
table. If a user doesn't enter a value in the combo box field, they receive
an error stating "You cannot add or change a record because a related
recordis required in table tblReason".
I would like to change the error messege but I am having trouble trying to
figure out where to trap the error. I have triend the Before Update and On
Error events of both the form and sub form, but I am still receiving the
standard Access run-time error.
Here is the code I am trying to use.
On Error GoTo Error_Handler
Exit_Procedure:
Exit Sub
Error_Handler:
If Err = 3201 Then
MsgBox "You must select a Reason from the drop down menu!"
Else
MsgBox "Error " & Err.Number & ": " & Err.Description
End If
Resume Exit_Procedure
Any help would be appreciated. Thanks