Pass Value from Main Form to SubForms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that collects patient information from 3 different sources.
(Three different types of documentation.) I have the following sort of
tables:

PatientDemographicData
InformationType1
InformationType2
InformationType3
DataEntrySession

The data entry session table assigns a random number to the patients medical
record number. This random number is what I want to use as the primary key
in the three information type tables.

Question. How do I create a form that keeps the patient demographic data at
the top, then uses 3 subforms to collect the various information, and passes
the random data entry session number to each subform for storage in their
respective tables?

Help.

Thanks.

Melinda
 
Add a field in all the tables that will relate to your "random" number in the
main table, I suggest you use autonumber for the primary key on your main
table instead, and long integer in the other tables with the same name for
the field

On your main form link your subforms using the Master and Child link fields,
that will take care automatically of the relation every time you enter a
record in the main table and in the subforms
 
Back
Top