Restricting column in linked Excel to require unique entries

  • Thread starter Thread starter Gabe
  • Start date Start date
G

Gabe

I have an Excel table linked to Access. I would like to
restrict one column to require all entries be unique. Is
there a way to do this in Excel?
 
Hi Gabe,

Excel's data validation system can do this (though not very easily) if
you're working in Excel. (If you want to do that, ask for help in an
Excel group.) But as far as I can tell Access doesn't notice, and the
result can be to leave the worksheet in an unusable state.

So I'd do it by only allowing access to the linked table via a form,
with code in the form's BeforeUpdate event procedure to do a DLookup on
the table to see if the value is already present, and if so cancel the
update and alert the user.
 
Back
Top