Custom message

T

TC

Do the data entry through a form. Code the form's Form_Error event. That
event is fired when the duplicate error occurs. Find out what error number
is used for that event (using a msgbox in the event). Then intercept that
number & provide your own message.

If by "macro" you >really mean< macro, forget it. Except for certain special
purposes, no-one uses macros these days. Learn how to use the VBA language
to do what you need. In Access 97, there's lots of information 9& a few good
examples) in online help. In later versions, I gather te help is not so
good. And/or get an Access book.

HTH,
TC
 
S

Sandra

I have a table which is indexed to prevent duplicate
entries. How can I pop up my own custom message box
rather than the standard Access message when the user has
entered a duplicate entry? I have created a macro with my
message but I don't know where to put it, and I don't
know how to disable the Access message if that is also
required.

Thanks so much,
Sandra
 
S

Sandra

Thanks, T.C., I'll check it out.
-----Original Message-----
Do the data entry through a form. Code the form's Form_Error event. That
event is fired when the duplicate error occurs. Find out what error number
is used for that event (using a msgbox in the event). Then intercept that
number & provide your own message.

If by "macro" you >really mean< macro, forget it. Except for certain special
purposes, no-one uses macros these days. Learn how to use the VBA language
to do what you need. In Access 97, there's lots of information 9& a few good
examples) in online help. In later versions, I gather te help is not so
good. And/or get an Access book.

HTH,
TC





.
 

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