G
Guest
Hi - I have a database that stores data for a person's demographic/contact
info, the studies they've participated in, and details for each study. I
have my tables set up as follows:
Table Demographics
DemographID (primary key)
name
address, etc.
Table Studies
WhichStudyID (primary key)
DemographID (foreign key linked to table demographics)
Study
Enroll Date
Study number
Table Study A
StudyAID (primary key)
WhichStudyID (foreign key linked to table studies)
DemographID
information for study A
Table Study A set up will be repeated for numerous studies, each with its
own set of information, but always linked back to the Studies table through
WhichStudyID
The Studies Table is connected to the Studies Form, which is a continuous
subform on the Demographics form. So a person can be in multiple studies,
each will have its own WhichStudyID. For each study, there is a separate
form that opens when a user hits a command button - this form is dependent on
the study name selected from a drop-down menu. So if the user selects StudyA
in the first section of the Studies continuous subform, the Study A form
opens to the record for that person. They can then enter a second study in
the next section of the continuous subform and click the button to go to that
studies form.
Up to that point, things are working fine. What I'm having trouble with is
getting the WhichStudyID to carry over into the StudyA table. The form opens
to the correct record for that person, but when I go to the table for StudyA,
the data on the form is there but not WhichStudyID.
Question 1 - are my tables set up in a way that makes sense?
Question 2 - how do I get WhichStudyID to populate into the Study A table?
Please let me know if you need additional information (the VBA code,
properties, etc.) - thanks so much for your help!!
info, the studies they've participated in, and details for each study. I
have my tables set up as follows:
Table Demographics
DemographID (primary key)
name
address, etc.
Table Studies
WhichStudyID (primary key)
DemographID (foreign key linked to table demographics)
Study
Enroll Date
Study number
Table Study A
StudyAID (primary key)
WhichStudyID (foreign key linked to table studies)
DemographID
information for study A
Table Study A set up will be repeated for numerous studies, each with its
own set of information, but always linked back to the Studies table through
WhichStudyID
The Studies Table is connected to the Studies Form, which is a continuous
subform on the Demographics form. So a person can be in multiple studies,
each will have its own WhichStudyID. For each study, there is a separate
form that opens when a user hits a command button - this form is dependent on
the study name selected from a drop-down menu. So if the user selects StudyA
in the first section of the Studies continuous subform, the Study A form
opens to the record for that person. They can then enter a second study in
the next section of the continuous subform and click the button to go to that
studies form.
Up to that point, things are working fine. What I'm having trouble with is
getting the WhichStudyID to carry over into the StudyA table. The form opens
to the correct record for that person, but when I go to the table for StudyA,
the data on the form is there but not WhichStudyID.
Question 1 - are my tables set up in a way that makes sense?
Question 2 - how do I get WhichStudyID to populate into the Study A table?
Please let me know if you need additional information (the VBA code,
properties, etc.) - thanks so much for your help!!