J
John S. Ford, MD
I have a table, tblAdmissions for which each record corresponds to a single
hospital admission. It has primary key AdmissionIDNum and fields such as
foreign key PatientIDNum as well as DateOfAdmission, DateOfDischarge, etc.
Each admission must have exactly one patient.
A second table is tblPatients with primary key PatientIDNum and fields such
as PatientNameFirst, PatientNameLast, etc. Each patient can have zero or
several admissions.
I then joined these tables to form qryAdmissions_Patients (using
PatientIDNum as the join field) in such a way that ALL records in
tblAdmissions are shown but only records in tblPatients where PatientIDNum
matches an Admission record--in other words ONLY patients who've been
admitted at least once.
I then created a form, frmAdmissionDataEntryForm using
qryAdmissions_Patients as its datasource. It allows users to use controls
to enter data on admissions each of which has a unique patient.
I have another form, frmPatientSearch using tblPatients as its datasource.
It allows users to search for a specific patient. What I want is to be able
to pass the searched for patient's PatientIDNum to frmAdmissionDataEntry
(possibly with the OpenArgs property). My user should then be able to enter
a brand new admission with that patient's information already populated on
the form.
How can I do this?
Thanks in advance!
John
hospital admission. It has primary key AdmissionIDNum and fields such as
foreign key PatientIDNum as well as DateOfAdmission, DateOfDischarge, etc.
Each admission must have exactly one patient.
A second table is tblPatients with primary key PatientIDNum and fields such
as PatientNameFirst, PatientNameLast, etc. Each patient can have zero or
several admissions.
I then joined these tables to form qryAdmissions_Patients (using
PatientIDNum as the join field) in such a way that ALL records in
tblAdmissions are shown but only records in tblPatients where PatientIDNum
matches an Admission record--in other words ONLY patients who've been
admitted at least once.
I then created a form, frmAdmissionDataEntryForm using
qryAdmissions_Patients as its datasource. It allows users to use controls
to enter data on admissions each of which has a unique patient.
I have another form, frmPatientSearch using tblPatients as its datasource.
It allows users to search for a specific patient. What I want is to be able
to pass the searched for patient's PatientIDNum to frmAdmissionDataEntry
(possibly with the OpenArgs property). My user should then be able to enter
a brand new admission with that patient's information already populated on
the form.
How can I do this?
Thanks in advance!
John