Message response help

Gary W. Graley

Registered User.
Local time
Today, 16:42
Joined
Feb 27, 2004
Messages
43
Hi folks, I searched on here but didn't see the help I need.

Here's the tale, using Access 2003 with service pack 3 installed

I have an entry table for a stockroom parts. I have the part number setup as the Key record so no duplicates allowed. So when someone tries to enter the same part number into the form, it comes up with it's message saying you can't do this and then when you click ok you get the Halt message box.

What I'd like to do is have it Message there is a duplicate and then display the form showing the part number information already in the table. I have that kinda working right now, but the basic Access messages flash up, but I have a macro that on the error opens a different form that promts them to put in the part number so they can see where the parts are in the stockroom.

As always, appreciate any help you can offer, my code writing skills are, well they are quite limited to be honest, so I rely on macro's for a lot of the stuff I do which I'm sure seems the long way around the barn.

Thanks!
G2
 
In what event are you performing this validation? And what default Access message are you referring to?
 
The even is adding a record through a form input, the table has the part number setup as the key with no duplicates allowed.

The message shows up as this;

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 date in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

And then an Action Failed message box appears that shows the macro name, I use a refresh macro to show the part description that comes from another table. And the only option is the Halt button as there aren’t any more steps to go through.

G2
 

Users who are viewing this thread

Back
Top Bottom