Try this:
Err_Command7_Click:
If Err.Number = 8512 Then
Resume Next
Else
MsgBox Err.Description & Err.Number
Resume Exit_Command7_Click
End If
The way you wrote it, the message box will still display, even though you
said Resume next.
God Bless,
Mark A. Sam
"pubdude2003"
> Hey all....
>
> I am getting a dialogue that says
>
> "None of the field names you pasted onto the Clipboard match the field
> names
> on the form."
>
> When I paste records from the clipboard to a form I've created. The paste
> works fine, I just want to kill the dialogue so that my less than bright
> clientele don't call me to ask me whether they should click Yes or No. The
> err.number (error... well it's not technically is it?) is 8512 but this
> code
> isn't killing the dialogue.... (and now on further testing the six sites
> that
> said this error was 8512 were fibbing a bit, the err.number isn't 8512
> which
> may well be why the code is not trapping... sigh.. anywaaaaay)
>
> Err_Command7_Click:
> If Err.Number = 8512 Then
> Resume Next
> End If
> MsgBox Err.Description & Err.Number
> Resume Exit_Command7_Click
>
> Thoughts anyone?
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200711/1
>