Table validation rule - allow only one occurence in a field

J

jaworski_m

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.

Thank you for suggestions.

Access 2003
 
J

jaworski_m

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

Yes, correct. But I would like to have Many records (not only 2) and only
ONE with value "Yes".
 
K

KARL DEWEY

I do not hink you can do it in a table but in a form.

If DSum <>0 then message and not allow change of checkbox.
 

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