Access2000: Unique values, but not exactli

  • Thread starter Thread starter Arvi Laanemets
  • Start date Start date
A

Arvi Laanemets

Hi

I have some table like:
MyTable: ID, Code, EntryTag

, where ID is an autonumeric (Main Index) field.

What is best way to make Code field do be unique when not empty, but to
allow it be empty for any number of entries. (When the new entries are
entered into table, Code may be not available jet for them. When user later
edits entries and enters missing codes, no code existing in other entries
can be allowed)


Thanks in advance!
Arvi Laanemets
 
By default an Access unique index does what you want. It ignores nulls,
although that can be changed via a setting in the index property dialog.
Only non-null values have to be unique. Look up index in the online help for
details.
 
Thanks, it did work!

Somehow I was sure it's opposite and didn't bother to check it over :-((
 

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

Back
Top