Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2002
    Posts
    31

    Question Unanswered: more than one selection

    Dear all,
    Is there a way that I can make more than one selection from a list or an option group,
    E.g I want to select more than on symptom from a list of symptoms for a patient, right now I'm using more than one list and more than one feild, yet this proved to be less helpfull as a patient may have all the symptoms in the list but most of them have only one or two symptoms, more over I can't make queries or calculate results from more than one feild
    MSELIMA

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: more than one selection

    Originally posted by mselima
    Dear all,
    Is there a way that I can make more than one selection from a list or an option group,
    E.g I want to select more than on symptom from a list of symptoms for a patient, right now I'm using more than one list and more than one feild, yet this proved to be less helpfull as a patient may have all the symptoms in the list but most of them have only one or two symptoms, more over I can't make queries or calculate results from more than one feild
    MSELIMA
    Maybe you can try check boxes. With the check box you can select as many as you need, it will be a bit more vba code, but it may be the only option that you have.
    Jim

  3. #3
    Join Date
    Dec 2002
    Posts
    31
    I tried the check boxes but here I have another problem in that I can't add any other symptoms present.
    more over the check box gives the choice of null or yes only but the other choice which is "not known" is not available

  4. #4
    Join Date
    Feb 2002
    Location
    San Antonio, TX
    Posts
    69
    A listbox might be better suited for what you are doing. Listboxes have a multiselect property.....
    "Doing stuff is overrated. Take Hitler for example. He did lots but don't we all wish he'd have just stayed home and gotten stoned?"

  5. #5
    Join Date
    Dec 2002
    Posts
    31
    I tried the list box yet there is a little problem which is it doesn't update the field in the table
    is there any way that i can overcome this problem

  6. #6
    Join Date
    Nov 2002
    Location
    Hillsboro, OR, USA
    Posts
    59
    Look at the ItemsSelected property. You can loop through this collection to get the index of all ListBox items selected (available in multiselect mode).

    Brian

  7. #7
    Join Date
    Dec 2002
    Posts
    31

    Question

    Thanks Brian,
    but I need that this list box update a field called symptoms and store this multi selection in it

  8. #8
    Join Date
    Sep 2002
    Location
    Land of OZ
    Posts
    173
    From what I gather through the posts, you problem may be two folds. Firstly it may be a table design issue. I assume that you have a table for patients? Does the field symptom exist in this table. If it does, then you will not be able to store multiple values. If a patient can have multiple symtoms, then you will need to create a table that holds the value of the patientVisitID, and SymptomID and maybe its own primary key.

    The you can use the listbox with a multiselect option to return to the selected items or you can use subforms. I have included a database with one method (subform method). The database contains the following:
    A table all patient details
    A table that records when the patient visited (this is a separate table as a patient may visit multiple times)
    A table with a list of symptoms
    A table linked to visit table and symptom table (this is a separate table as each visit the patient may have different symptoms)

    I have added notes into the database
    AddPatient form to add a new patient into database
    AddSymptoms form to add a new symptom yo the database
    PatientVisits and PatientVisist subform forms are one way of doing thing ...
    There is a second way of doing this using a multiselect listbox, but it requires a fair amount of programming knowledge ... if you are interested in that I am happy to build an example for it ...


    Hope that this helps ...



    Originally posted by mselima
    Thanks Brian,
    but I need that this list box update a field called symptoms and store this multi selection in it
    Attached Files Attached Files
    Mona
    ________________________________
    Life is too short to be sane or sensible. Weird people rule and normal people suck

Posting Permissions

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