Change Default Message Box (Duplicate Record)

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
 
G

Gerald Stanley

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
 
A

Andy

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
 
F

Frank Stone

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top