Restricting column in linked Excel to require unique entries

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?
 
J

John Nurick

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top