Change Default Message Box (Duplicate Record)

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi;

Want to use a customize MsgBox to replace:

"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
Change the data in the field or fields that contain duplicate data, remove
the index, or redefine the index to permit duplicate entries and try again."

I know how to create the MsgBox and Error handling.

What I need to learn is where to place it and how to determine if it's a
Duplicate Record MsgBox.

In which event is the code placed and what code snippet do I need?

Andy
 
You would need to code the form's Error eventhandler. If
you look in the Help file, there is a code snippet for the
condition that you wish to cover.

Hope This Helps
Gerald Stanley MCSD
 
Gerald;

Found it.

Thank You.

Andy

Gerald Stanley said:
You would need to code the form's Error eventhandler. If
you look in the Help file, there is a code snippet for the
condition that you wish to cover.

Hope This Helps
Gerald Stanley MCSD
 
You will need to know the error code number also. in the
error handler section of the sub add code like....
if error code nummber then
custom megbox
end if

To find the error number use something like this In the
error handling section first
MsgBox Err.Number & " " & Err.Description
Resume exit sub
 
Back
Top