Warning for Duplicate entry (1 Viewer)

nmodhi

Registered User.
Local time
Today, 09:56
Joined
Jan 26, 2010
Messages
25
This is quite difficult to explain but I'll try my best, here it goes..

I may have set up my tables incorrectly, but I can't seem to find a better way to construct the tables I currently have. In one of my tables I have two fields that are repetitive individually but cannot have the same information twice. For example..

Field1 ||Field 2
abc 123
abc 123

I'm trying to avoid this. I have thought of a way but I can't seem to implement it. This is the method I am trying to implement..

I have a field on my form that allows changes to Field 2, keeping Field 1 as a search and display control only.

So if there is some way I can check if the value being entered in field 2 is a duplicate entry, to warn the user, that would be awesome..though I'm not an expert at VBA. Any Ideas?
 
Last edited:

Magster

Registered User.
Local time
Today, 06:56
Joined
Jul 30, 2008
Messages
115
You can create an alternate unique index on the table. You can combine the two fields and then make sure that you indicate that it is unique. This will prevent a duplicate of the two fields from being entered.

I'm running to catch my bus home now, but if you respond that you dont' know how this is done, I'll get back to you tomorrow.
 

SOS

Registered Lunatic
Local time
Today, 06:56
Joined
Aug 27, 2008
Messages
3,517
You can create an alternate unique index on the table. You can combine the two fields and then make sure that you indicate that it is unique. This will prevent a duplicate of the two fields from being entered.

I'm running to catch my bus home now, but if you respond that you dont' know how this is done, I'll get back to you tomorrow.

Just an FYI but there is a pictoral on that here.
 

Magster

Registered User.
Local time
Today, 06:56
Joined
Jul 30, 2008
Messages
115
That's perfect! A picture is worth a thousand words!
 

Users who are viewing this thread

Top Bottom