Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

List of items what control to use and how to store them?

Discussion in 'Information Technology' started by pokdbz, Nov 11, 2005.

  1. pokdbz

    pokdbz
    Expand Collapse
    Guest

    I have a bunch of medications that need to be listed on a form and be
    selected. I was wondering what is the best control to use for this and how
    will it save the data?.

    I was thinking that check boxes would be easy to use but not sure how to
    implement this. Can you have a bunch of check boxes referring to a different
    medications save in one field say something like: med1, med2, med3

    Not sure what the best way to go about this is.
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News How The Left & Indian Nationalists Distorted The History Of Sikh Gadhar Movement - Breaking News Sep 21, 2016
    Interfaith Materialists And Its Discontents Interfaith Dialogues Jun 10, 2016
    Sikhi Quasi-Pragmatists And Quasi-Spiritualists, Care To Explain? Sikh Sikhi Sikhism Jun 6, 2016
    Cholesterol Is Finally Officially Removed From "naughty List" Health & Nutrition Feb 11, 2016
    Listening to Gurbani while driving?? Sikh Rehat Maryada Jan 13, 2016

  3. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "pokdbz" wrote

    > I have a bunch of medications that need to be listed on a form and be
    > selected. I was wondering what is the best control to use for this and

    how
    > will it save the data?.
    >
    > I was thinking that check boxes would be easy to use but not sure how to
    > implement this. Can you have a bunch of check boxes referring to a

    different
    > medications save in one field say something like: med1, med2, med3


    If you have just a few... a relative "handful", then you might effectively
    use check boxes or option buttons. If you have more than a few, I'd suggest
    a Combo Box . . . by default, if you start typing in an Access Combo, it
    will scroll to the nearest match. This is called the AutoExpand feature of
    the Combo Box. Use a Row Source (that determines what data is included) that
    extracts all the medications id and name, but only displays the name to the
    user.

    If you use the Medication field as the Control Source for this Control, it
    will automatically save the selected value (as all Forms in Access do) when
    you move to a different Record, close the Form, or explicitly save.

    I see that your question _could_ imply that you are saving more than one
    medication in the field. I hope that is not the case, because that's a
    violation of relational database design rules, and could cause you problems
    in the future.

    Larry Linson
    Microsoft Access MVP
     
  4. Sprinks

    Sprinks
    Expand Collapse
    Guest

    Pokdbz,

    This brings up a very interesting point. From the relational database
    perspective, there is a natural one-to-many relationship between Patients and
    "PatientMedications", implying a main form on patients, and a continuous
    subform for the detail, based on PatientMedications. Each medication in the
    subform could be chosen from a combo box.

    But, since you have a limited number of choices for medications that can be
    presented conveniently on a single screen form, the data entry would be
    easier through checkboxes.

    I suggest that you present a form for your user, allowing him to pick from
    checkboxes, and provide a "Commit" button that then inserts the relevant
    records into your detail table.

    Sprinks


    "pokdbz" wrote:

    > I have a bunch of medications that need to be listed on a form and be
    > selected. I was wondering what is the best control to use for this and how
    > will it save the data?.
    >
    > I was thinking that check boxes would be easy to use but not sure how to
    > implement this. Can you have a bunch of check boxes referring to a different
    > medications save in one field say something like: med1, med2, med3
    >
    > Not sure what the best way to go about this is.
     

Share This Page