"related field is required" details

  • Thread starter Susan K via AccessMonster.com
  • Start date
S

Susan K via AccessMonster.com

Here is my problem in detail as best as I can describe it. I know I missing
something
that is probably very simple and basic, but it is eluding me. I am a novice
at Access,
but I thought I understood the basics of it. I created this DB, which I
thought was
simple and straightforward, but I guess I was wrong. Separately, the main
form
and its subforms work well, but I have problems when I join them together.
I have a main form called Patient Info with PatientID as the Primary Key
(there is also a field called Patient Chart Number which is unique to all
patients
and which I have also used as a Primary Key in this form when testing it).
I have several other smaller tables --- tblIrritants, tbl OtherDx,
tblOtherMeds,
tblPulDx, tblPulMeds, tblTravelHx and tbl SurgicalHx. Respectively, their
Primary
Keys are IrritantsID, OtherDxID, OtherMedsID, PulDxID, PulMedsID, TravelHxID
and
SurgicalHxID. All of the smaller tables also have the Patient Chart Number
listed, but not as a Key. I originally had all of the tables linked to the
PatientID or Patient Chart Number, which resulted in all being one-to-many
relationships. I got the "related record is required" when I tried
to enter
the subforms (OtherDx, PulDx, PulMeds and OtherMeds)--it was never the same
subform twice in a row, it seemed. So, then I tried adding the names of the
smaller tables' keys to the main table so that I could link each table to its
corresponding key in the main form (PulDxID to PulDxID and so on)--
now I have many-to-one relationships. I have been able to enforce
referential integrity and cascade with all of these relationships mentioned
here. I still have the same problem with the "related record is
required"
when entering the subform portions of the form. Sometimes it is required in
tblPatientInfo (the main table), sometimes it is the other tables. What am I
doing wrong here? Like I said, I thought it was a straightforward table, but
I guess not. All help will be greatly appreciated. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top