No duplicates wanted in column except for default value...

C

Coolbreeze

Hi,
Having a hard time trying to help myself with this one, so I am posting a
question...

I want to set a field in my table to have no duplicates allowed except for
the Default Value I assign to it... I want to accept multiple entries of the
default value, but only single entries for all else...

Possible?
Thanks in Advance...
 
A

Al Campagna

Coolbreeze,
Sounds like that will have to be handlked at the form... more so
than the table.
A field is either Indexed NoDupes or Dupes Allowed. No way to mix...
Make the field Allow Dupes.

I'll assume that the value that can be duped is ALWAYS the same.

At the form level, you'll need just let the Default Value do it's thing,
and not
worry about it. But when you manually override that default value, you'll
need
to do a DLookup against all your other values... to manually make sure that
it's not a dupe.
Use the Before Update event to check for dupes... it allows a Cancel =
True,
in the case of a dupe.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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