Bob,
OK, got you. You can use the After Update event of the control to run a
macro that looks up the table for the specific value, and displays a warning
message box it a duplicate is found. Open the form in design view, open the
properties window for the control in question and select tab Events. Place
the cursor next to the After Update event, click on the small button with
the three dots that appears on the righ hand side and select Macro builder.
You will be taken to the macro design window, and be asked for a name for
your macro - call it something that makes sense to you. Then, if you don't
have column Condition in your grid as the first column, use menu item View >
Conditions to make it appear. Now in the first row put the followinmg
expression in the Conditions column:
DFirst("[Ctry_ID]","Countries","[Countries].[Ctry_ID]='" &
[Forms]![frmCountries].[CID] & "'")<>""
(this example assumes that the table is called Countries, the field in it is
called Ctry_ID, the form is called frmCountries and the control is called
CID; change to your actual names)
Note: the syntax above assumes that the field is Text type. If it is numeric
then use this instead:
DFirst("[Ctry_ID]","Countries","[Countries].[Ctry_ID]=" &
[Forms]![frmCountries].[CID] )<>""
On the same line, in the Action column type the word "MsgBox" (without the
quotes). You will see a small window with four arguments in the bottom left
hand corner. Type your warning message in the first one, and leave the
others as they are (or play around with them to see what they do). Save and
you're done.
HTH,
Nikos