Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2011
    Posts
    3

    Question Unanswered: Linking to tables in subform? newbie questions

    Hi All, I am new and desperate..I have a question

    I am trying to create a db with women and information on their pregnancies so i have the following tables

    medications
    medID
    pregID
    drugs

    pregancy
    pregID with womanID, start date, end date

    woman
    womanID, last name, first name, and her pregnancyIDs

    on the main form I want the woman and then a subform with the pregnancies and i would like to be able to click within this subform to the medications she took during that pregnancy..

    am i setting this up right? can I link to the medications table directly and if so, how? THANK you.
    Attached Files Attached Files
    Last edited by boriss`; 06-21-11 at 14:29.

  2. #2
    Join Date
    Jun 2011
    Posts
    3
    never mind I figured out how to link to the new table but I'm worried I'm not setting up the database correctly

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Based on your tables I would suggest some changes.

    1. The Woman and Pregnancy tables have a one-to-many relationship. One woman can have multiple pregnancies. So I would have the WomanID in the Pregnancy table but not have any Pregnancy information in the Woman table.

    2. It's unclear to me how the Medications table works. If Medications is related to Pregnancies then it is a many-to-many relationship. One Pregnancy can have multiple medications and one medication can be prescribed to multiple pregnancies. So you need three tables for this relatiionship. Pregnancy, Medications, Pregnancy Medications. Pregnancy Medications would have WomanID and MedicationID and perhaps the dosage in it. Remove PregID from the Medications table. Medications should only have medications in it. The name, the maker, etc.

  4. #4
    Join Date
    Jun 2011
    Posts
    3
    thanks so much, i took your suggestions, i think i was overcomplicating things. I added a Survey table too, but it shouldn't be as difficult as the medications table.

    how would you suggest making the form more user friendly? this looks very ugly to me and it seems backwards, again, the person doesn't have a "medID" yet, they get that after filling out the medications form first.

    http://img814.imageshack.us/img814/3262/11408118.png
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •