View Single Post
  #3  
Old October 23rd, 2009, 11:49 PM posted to microsoft.public.access.tablesdbdesign
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Table validation rule - allow only one occurence in a field

jaworski_m wrote:
Hello,
Suppose there's a table (many side):

ID (PK)
ID_foreign (FK)
field 1
field 2
yes/no field

How can I allow ONLY ONE record to have "yes/no field" = True? (with table
validation rule)
In case a user sets a second record "yes/no field" = True an error is
triggered.

What happens when you add a unique index (no duplicates) to the yes/no field?
You do realize that with this rule enforced at table level, you can only have
two records in your table, right? (one Yes and one No).
Thank you for suggestions.

Access 2003


--
Message posted via http://www.accessmonster.com