I’m working on a database which stores information on hospital patients with neurological disorders. There are currently two tables: 1. Audit_Proforma (which stores info on the patients and their medical history), and 2. AED (which stores info on their drug regimes).
What I would like is a main form which has a combo box listing the patients names and Hospital ID number. When you select a patient with that combo box I would then like to have a command button which opens the Audit_Proforma form at that particular record.
I have succeeded (to a point) in populating the combo box with the patients. I have at present an unbound combo box and its row source in the properties I have entered the following text:
SELECT Audit_Proforma.PatientName, Audit_Proforma.HospNumber FROM Audit_Proforma ORDER BY Audit_Proforma.PatientName;
This is only showing the patient name, whereas I hoped it would also show the Hospital ID. So that’s the first problem.
The second is that I can’t work out how to add a button that will open the form at the chosen record. I’ve tried putting in some code for the on click event which I butchered from another database (involving Dim stDocname and Dim stLinkcriteria), but I haven’t got anywhere. Would anyone be able to point me in the right direction?
Thanks
What I would like is a main form which has a combo box listing the patients names and Hospital ID number. When you select a patient with that combo box I would then like to have a command button which opens the Audit_Proforma form at that particular record.
I have succeeded (to a point) in populating the combo box with the patients. I have at present an unbound combo box and its row source in the properties I have entered the following text:
SELECT Audit_Proforma.PatientName, Audit_Proforma.HospNumber FROM Audit_Proforma ORDER BY Audit_Proforma.PatientName;
This is only showing the patient name, whereas I hoped it would also show the Hospital ID. So that’s the first problem.
The second is that I can’t work out how to add a button that will open the form at the chosen record. I’ve tried putting in some code for the on click event which I butchered from another database (involving Dim stDocname and Dim stLinkcriteria), but I haven’t got anywhere. Would anyone be able to point me in the right direction?
Thanks