Calculated fields based on multiple records
I'm trying to set up a table so that every field in it gets populated by information from another table.
I have 3 tables. CONTACTS, REGISTRATION, SCHEDULE
CONTACTS has a primary key, registration and schedule are both linked to CONTACTS via that key. I have a script so that when I create a new record in CONTACTS it also creates a new record in the SCHEDULE table so the two link.
I'm trying to create various records in REGISTRATION table and have information then auto entered into the SCHEDULE table.
My fields in SCHEDULE are all set up to be calculations based on an if function. My problem comes from the fact that they are only accessing the 1st matching record in the REGISTRATION table and that's it. I delete a record a different field then updates.
How do I get my calculation to work with related records in REGISTRATION as opposed to just the 1st created record?
Right now my calculation is:
If ( REG::reg_day= "Monday" and REG::reg_period="1" ; REG::reg_class_name). Iv'e also tried If ( REG::un_fk=SCH::un_fk and REG::reg_day= "Monday" and REG::reg_period="1" ; REG::reg_class_name)