A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old February 13th, 2010, 10:26 AM posted to microsoft.public.access.tablesdbdesign
coolbreeze
external usenet poster
 
Posts: 3
Default No duplicates wanted in column except for default value...

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...
  #2  
Old February 13th, 2010, 03:01 PM posted to microsoft.public.access.tablesdbdesign
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default No duplicates wanted in column except for default value...

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."

"Coolbreeze" wrote in message
...
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...



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.