I have a parent form with three tabs for subforms. Each subform is attached to a table:
· "Demographics" displays a single record.
· "Appointments" displays continuous records.
· "Status" displays continuous records.
To enter a new record under "Appointments" or "Status", I use a drop-down box on the parent form to execute a small VBA script to "call up" the proper record on the "Demographics" tab first.
Each table has multiple fields including:
· Primary key "ID" field (autonumber).
· "MedRecID" field (number).
I have defined a one-to-many relationship between:
· Demographics.MedRecID -> Appointments.MedRecID
· Demographics.MedRecID -> Status.MedRecID.
When I enter a new record in the Appointments tab, it automatically fills Appointments.MedRecID with the value from Demographics.MedRecID. This is exactly what I want it to do.
However, when I enter a new record in the Status tab, it fills Status.ID with the value from Demographics.ID instead of filling Status.MedRecID with the value from Demographics.MedRecID.
I cannot figure out what I'm doing wrong here. I would greatly appreciate any pointers.
· "Demographics" displays a single record.
· "Appointments" displays continuous records.
· "Status" displays continuous records.
To enter a new record under "Appointments" or "Status", I use a drop-down box on the parent form to execute a small VBA script to "call up" the proper record on the "Demographics" tab first.
Each table has multiple fields including:
· Primary key "ID" field (autonumber).
· "MedRecID" field (number).
I have defined a one-to-many relationship between:
· Demographics.MedRecID -> Appointments.MedRecID
· Demographics.MedRecID -> Status.MedRecID.
When I enter a new record in the Appointments tab, it automatically fills Appointments.MedRecID with the value from Demographics.MedRecID. This is exactly what I want it to do.
However, when I enter a new record in the Status tab, it fills Status.ID with the value from Demographics.ID instead of filling Status.MedRecID with the value from Demographics.MedRecID.
I cannot figure out what I'm doing wrong here. I would greatly appreciate any pointers.