Newbie here. I have a table called tblCity. The only information goes in column “City”. Before creating a new entry, I need a macro to check if the City I am entering is already on the table. If it’s already there, I would like a pop-up message saying “already in the list”
Thanks
Luis
Why? You can set the column as UNIQUE and the database will prevent double entries.
Open the table in design view and call the index designer in order to add a unique index. The attached sample does not allow duplicate names, no matter if you try to enter them directly into the table, through a query, form, SQL command or macro.
On a form, you may use a multi-row combo box showing the already existing names below your keyboard entry, selecting the entry that matches your input.
Unique_Names.odb (18.9 KB)