Results 1 to 4 of 4
  1. #1
    beaverx37 is offline Novice
    Windows 8 Access 2007
    Join Date
    Nov 2014
    Posts
    16

    Fields showing up as needed??

    I am trying to adjust access' student template to make a database for my camp. Basically it is what I need, but one of my field options is allergies and medication. Well if someone has one medication they take with the dosage and frequency that is great. But if someone else has 5 medications they take that is more complicated. So is there a way to make a new medication field be added as needed for people with multiple medications?



    I hope this kinda explains what I asking. I am very very new to access...

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    That is not the norm. Usually you would have a record for each Medication, not a separate table for each Medication.
    Agree totally with the complexity comment.

    Consider :

    A Person may have 0 or many Medications.
    A Medication may have 1 or many dosage/frequencies.

    So for a specific person, you would have to relate

    Person takes Medication with Dosage X and Frequency Y.

    Another Person could take the same Medication with different dosage and frequency.
    So you would have to be explicit with Medication, Dosage and Frequency for Each Person.

  3. #3
    beaverx37 is offline Novice
    Windows 8 Access 2007
    Join Date
    Nov 2014
    Posts
    16
    Click image for larger version. 

Name:	Student Detail Example.png 
Views:	8 
Size:	21.0 KB 
ID:	18564

    I think I understand what you are saying. I only need the medications as they pertain to my camper. I dont need to know 4 people take this same medication. Here is an example of what I want to know if is possible. Right now I have our Mr. John Smith's detail sheet, who has Med 1 as is currently displayed. But lets say he also has med 2 and med 3. Can I make him have those same entry slots (medication, dosage, frequency, and special instructions) show up again in 3 sets. but for someone who has 2 medications they only show 2 sets. So I don't have 3-4 empty sets for people with fewer medications?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I your sample case, 1 camper has 3 Meds. This is a 1 to many relationship.
    Usually you would display this using a Form and subForm where the 1 side would be presented ona Form dealing with the Camper.
    The subForm would be the Many side showing each of the Meds with related dosage and frequency. The Form and subform have a common field,
    the LinkFields (CamperID probably) to jkeep form and subform in sync.

    What you are showing is a Form. Behind the Form is a table or possibly a query involving multiple tables or parts thereof.

    I don't know your entire requirement, but my best guess would be to have a

    tblCamperMeds
    with fields
    CamperId
    MedID
    MedName
    MedDosage
    MedFrequency
    SpecialInstructions

    Let's say you have Camper 37
    who has 4 Meds
    You could have a table with
    Code:
    CamperId  MedId MedName MedDosage MedFrequency SpecialInstructions
          37        2       Lipitor        40mg           1 per day   
          37        17     Norvasc      10mg           1 per day
          37        18     Xalta            5mg           2 per day     take with Orange juice
          37        20     zoffar           2mg           1 per week   take same day each week
    Hope this is helpful.

    For more on Form/subform see youtube look for 599CD Form subform

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 09-14-2014, 02:34 PM
  2. Replies: 3
    Last Post: 05-16-2014, 12:40 PM
  3. Replies: 15
    Last Post: 04-16-2014, 01:15 PM
  4. Report not showing some fields
    By Ruegen in forum Programming
    Replies: 2
    Last Post: 11-25-2013, 11:37 AM
  5. Replies: 4
    Last Post: 05-14-2012, 06:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums