I would like to suppress the following warning:
"The text you entered is an item in the list
Select an item from the list, or enter text that matches one of the items in the list"
this comes up when i am pasting data from an excel spreadsheet into a data sheet in ms access.
The field in MS access is set to "limit to list" so that no garbage data can be stored.
In my code below i have created my own message box for the user to note the details of the failed paste, i only want my message to show.
I also seem to get my message pop up twice, once with the ATMID and then immediatly afterwards with no ATMID in the message for each failed paste.
my code is :I also seem to get my message pop up twice, once with the ATMID and then immediatly afterwards with no ATMID in the message for each failed paste.Private Sub ATMID_BeforeUpdate(Cancel As Integer)
DoCmd.SetWarnings False
On Error GoTo AtmID_BeforeUpdate_Err
Me.KnownGLCode = DLookup("BankGlCode", "qry_Atms_Extended_Full", "[id] = " & Me.ATMID.Value)
Me.Van = DLookup("CITVanName", "qry_Atms_Extended_Full", "[id] = " & Me.ATMID.Value)
AtmID_BeforeUpdate_Exit:
Exit Sub
AtmID_BeforeUpdate_Err:
MsgBox "Atm : " & Me.ATMID & " : Does not exist", vbOKOnly, "Error is processing..."
Me.Undo
Resume Next
End Sub