Simple Input Mask Expression for No Duplicate Entries (1 Viewer)

browninaz

Ugly Data Hoarder
Local time
Today, 07:30
Joined
Oct 26, 2012
Messages
88
Hello All,

Just a quick simple question for most that participate in this forum. I just need a quick, simple expression that I can copy and paste into the input mask for a control that I have on a couple of forms that prevents someone (me) to continue tabbing to the next control if the value entered is a duplicate. No code please if possible, I don't really want to go through all that drama right now.

Thanks to all who know more than me...
 

MarkK

bit cruncher
Local time
Today, 07:30
Joined
Mar 17, 2004
Messages
8,178
To find a duplicate you have to check all the other rows in the table, to see if the current entry exists there. Can't be done in a mask. Might require drama, I mean, code. :)
 

jdraw

Super Moderator
Staff member
Local time
Today, 10:30
Joined
Jan 23, 2006
Messages
15,362
Further to Markk's comment, you could have some code to do a Dcount(), or you could have a No Duplicates on the table field... Is this a bound form?
Perhaps a little more detail would help readers.
 

browninaz

Ugly Data Hoarder
Local time
Today, 07:30
Joined
Oct 26, 2012
Messages
88
Thanks guys for the quick comments. The controls are bound to a table, and if I must, I will throw some code In that control. Here's where the less than intermediate user gibberish starts... With the right code, If the control is bound to a table, will the code I apply to the control apply to the field in the table? Do I also keep the field property index set to yes, no duplicates? Also, I write VBA like a one year old speaks, so can someone give me a snippet of code that I can have so that I may copy and paste it into the editor?

Thanks again!
 

Users who are viewing this thread

Top Bottom