Hi, is there a way to turn off a specific error? The error in access is error #2105. I am telling my user to select a value if they did not already, and then setfocus back on the textbox, but I get an error message after I display the message box that "You can't go to the specified record" and would like to turn this message off. Thanks!
Code:
Option Compare Database
Private Sub ContactType_AfterUpdate()
ContactPosition.Requery
ContactPosition.Value = ""
Me.ContactType.SetFocus
End Sub
Private Sub Region_AfterUpdate()
Borough.Requery
Borough.Value = ""
Neighborhood.Value = ""
End Sub
Private Sub Borough_AfterUpdate()
Neighborhood.Requery
Neighborhood.Value = ""
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Contact Position
If IsNull(Me.ContactPosition.Value) Or Me.ContactPosition.Value = "" Then
MsgBox ("Please select a contact position.")
Cancel = True
Me.ContactPosition.SetFocus
End If End Sub