Validation Rule at Table Level.

Local time
Today, 16:17
Joined
Mar 23, 2022
Messages
45
Hi Guys,

Please help me how to use Table Validation Rule to validate the following.

During Data Entry Ms. Access should validate that there should not be more than two participants from each country under the same category.

Can it be done under Table Validation Rule.
 
you need to create Data Macro, particularly Before Change macro.
 
upload your db with the table you need to validate.
 
Hi Guys,

Please help me how to use Table Validation Rule to validate the following.

During Data Entry Ms. Access should validate that there should not be more than two participants from each country under the same category.

Can it be done under Table Validation Rule.

This is not a simple data validation, which usually relates only to the current record and not any other record. Looking at other records to determine whether a data constraint applies across multiple records requires some code or, as arnelgp suggests, a macro of some kind.
 
open table1 in design view and see the macro on Before change.
open table1 to enter data. try to input duplicate country and category.
 

Attachments

open table1 in design view and see the macro on Before change.
open table1 to enter data. try to input duplicate country and category.
The solution above is for duplicate entry.

But I need to check for 2 similar entry with the same country and under the same category.

Only two participants from the same country can participate in the same category.

aaa-USA-Swimming
bbb-USA-Swimming
ccc-UK-Chess
ddd-UK-Chess
 
Last edited:
The solution above is for duplicate entry.

But I need to check for 2 similar entry with the same country and under the same category.

Only two participants from the same country can participate in the same category.

aaa-USA-Swimming
bbb-USA-Swimming
ccc-UK-Chess
ddd-UK-Chess
 

Users who are viewing this thread

Back
Top Bottom