Data Validity and Formatting for referenced tables

I have two tables: EvacRecord and PetRegistration.

I have been asked to prevent users from checking a person out (EvacRecord) if they have not checked out their pet (PetReg). How can I do this?

I tried using the data validity to say: ISNOTBLANK(dbo.tblPetRegistration[CheckedOutBy]) but this still let me check the person out.

Also, I want to set a format rule so if the person has a pet checked in their is a green paw and if the person has checked their pet out the paw is a diff color. But when I set a format rule every record gets a paw - what is the expression to have it match the RegID between the two tables?

Iโ€™d be setting the format rule for the record in the EvacRecord, but I canโ€™ figure out how to get it to only reference the RegID of the row in question.

Thanks

0 3 352
3 REPLIES 3

Instead of using ISNOTBLANK(), you could try to use COUNT(โ€ฆ)>0

But what would I be counting? I would need a way to check which pets were checked in but not checked out. if pets are checked and out then no error, if checked in but not out then error.

How aboutโ€ฆ AND(COUNT(โ€ฆ)>0,MOD(COUNT(โ€ฆ),2)=0)

Top Labels in this Space