Checking for duplicate values (1 Viewer)

FISHiEE

Fish obsessive
Local time
Today, 23:53
Joined
Nov 12, 2004
Messages
86
Hi,

I have a form in a database for our products (doors). I have a button that duplicates one of these records (all new products are based on standard template records).

When this record is created a new product number is produced by the system which was the number of the original (template) record plus the customer enquiry number.

I want to be able to warn the user if they are trying to save this newly created record with a product number that already exists so that they can alter the number to be unique. It will also warn them if they re-number an existing record to another already existing product number. Since the field is defined as unique, at present the system says absolutely nothing and just doesn't save the newly created record which seems is a touch annoying!

I have tried several things with dlookup, dcount arguments but can't seem to get anything to work.

Hopefully someone here can point me in the right direction?

Thanks in advance

John
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:53
Joined
Feb 19, 2002
Messages
43,457
at present the system says absolutely nothing and just doesn't save the newly created record which seems is a touch annoying!
You must have warnings turned off. Check your code to see if that turns them off and check the Tools/Options to see if they were turned off manually.
 

FISHiEE

Fish obsessive
Local time
Today, 23:53
Joined
Nov 12, 2004
Messages
86
I shall have a look and see, but don't think warnings are turned off. I get messages for other scenarios that occur on the same form.

If they are turned off in the access menu that would apply to the whole of the database right? That certainly isn't the case. I shall check and see if messages are turned off in the code anywhere.
 

Users who are viewing this thread

Top Bottom