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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|