Sample data for the table is: ( For simplicity I reduced to 3 studies actually there are 30 more studies )
MRN STUDY1ELIGIBLE STUDY2ELIGIBLE STUDY3ELIGIBLE
1234 1 0 1
4567 0 1 1
Where Studyeligible means patient eligible for studies. This table/patient data is shown in the main page as dashboard for each patient.
For example, main dashboard (formname is Mainform) will show MRN : 1234 STUDY1ELIGIBLE: 1 STUDY2ELIGIBLE: 0 STUDY3ELIGIBLE : 1 and there is a button to open another form
named ( Scheduleform ) and behind the form is a table name tblSchedule whose schema is:
tblSchedule: ( ID is Primaykey and autonumber datatype)
ID MRN STUDYNAME SCHEDULEDATE
The relationship between tblMain and tblSchedule is ( One to Many ) coz a patient can enroll in any number of studies.
Question: I want to have a combo box for the Studyname field in Scheduleform which populates the Studynames based on the previous selection which I have enrolled (criteria is StudyXELIGIBLE = 1 )
in the tblMain.How to populate the combobox values with those studynames ?
For example: on opening the Scheduleform for MRN 1234 the combobox should show only STUDY1ELIGIBLE and STUDY2ELIGIBLE and select one of them and save it in the Studyname field of Studyname of tblSchedule.