September 18, 20169 yr Newbies Hello Sorry for the question... certainly asked numerous times. I am spending two days trying to understand the concept but didn't catch the idea to implement it. My database is a medical invoices one. I have one table for patients administration (one of the fields is a calculation field with his/her age in years depending of the birthdate), one for invoices, another one for invoice lines, and another one for medical examinations provided by our office (including the Minimum patient age and the Maximum patient age for each exam). The medical exams list is provided by a pop up menu for each invoice lines. After selecting the appropriate exams, the price of the exams are populated and the total of the invoice is calculated. At this point, every thing is ok... but I need to limit the available choices of medical exams in the pop up menu to the exams possible for each patient depending his/her age. I failed to success with error "index Missing". Please may you provide the best practice in this kind of situation? Thank you.
September 18, 20169 yr You need to start by defining a relationship between Patients and an occurrence of the Exams table (here, I will call it AvailableExams) as: Patients::cAge ≥ AvailableExams::MinimumAge AND Patients::cAge ≤ AvailableExams::MaximumAge Then define your value list to use values from AvailableExams::ExamID, show only related values starting from Patients. This is assuming you are selecting the exam in a record of the LineItems table that is already related (through Invoices) to a patient in the Patients table (and therefore also related to the available exams in the AvailableExams TO). Caveat: untested. Edited September 18, 20169 yr by comment
Create an account or sign in to comment