Page 1 of 3 123 LastLast
Results 1 to 15 of 33

Thread: list box (2007)

  1. #1
    rlbroerman
    Guest

    list box (2007)

    I want to select multiple items from one list boxes and then be able to list them out on a form in a group.
    I want the form to list out multiple medications with their dosages and frequencies. I think I want all of this in one record if possible.
    Can you give me and idea about how to do this.
    Thanks in advance.
    Rick B

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list box (2007)

    You can set the MultiSelect property of a list box to Simple or Extended. This will let the user select multiple items in the list box. If you search this forum for multi select list box you'll find examples of how to use this.

    If you want more help, could you provide detailed and specific information?

  3. #3
    rlbroerman
    Guest

    Re: list box (2007)

    I couldn't find any posts in "multi select list box" search that seemed to apply to what I am trying to do.
    I tried the " simple"in the MultiSelect property and it did let me select multiple items from a list box but it didn't seem to put them where I told it to. Got any suggestions?
    Rick B

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list box (2007)

    Please provided detailed information about what you're trying to accomplish.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: list box (2007)

    I had a problem with multi select when I wanted to select a number of email addresses and put them into the To: line of an outgoing email. Hans gave me a lot of help here.
    I wrote code (which is probably dreadful but it does the biz) behind the selections which looks like this :
    Dim frm As Form, ctl As Control
    Dim varItm As Variant
    Dim strRecipients

    Set frm = Forms!MultiMail
    ' Make ctl point at the form list box
    Set ctl = frm!MultiMailList
    strRecipients = ""
    For Each varItm In ctl.ItemsSelected
    strRecipients = strRecipients + ctl.ItemData(varItm) + ";"
    Next varItm


    In this instance, this is obviously stringing all the selected email addresses together separated by semi-colons. However, this might give you some ideas about how to put the selection(s) into the control(s) you specify.
    Hope so
    Silverback
    Silverback

  6. #6
    rlbroerman
    Guest

    Re: list box (2007)

    I want to save Medicine name, dosage, and frequency for each patient in the visits table. I want to be able to review all the info for a patient and then print out in a report. I started by trying to save only a group of medicines to the visits table.
    As a beginning test I used a list box in frmMedicine to save in the visits table and that worked but when I change MultiSelect property to simple then it would save it into the visits table.
    Can you help, please.
    Also my Database is getting large so I must strip some of it out to get the ZIP under 100k. Is there any way to send a ZIP file larger than 100k?
    Rick B
    Attached Files Attached Files

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list box (2007)

    You shouldn't store multiple medicines in a single field. Since a patient can use multiple medicines, you need an intermediate table.
    If you want to view medicine use as a property of the patient, it should be a patient-medicine table. This table should contain Soc Sec No (to identify the patient) and ID (to identify the medicine), plus additional info such as dosage.
    If you want to view medicine use as a property of a visit, it should be a visit-medicine table instead of a patient-medicine table. This table would contain VisitID (to identify the visit) and ID (to identify the medicine), plus additional info such as dosage.
    You'd use a subform to enter records in this intermediary table. See <post:=364,203>post 364,203</post:> for an example.

    And no, it's not possible to attach files larger than 100 KB to a post, it shouldn't be necessary.

  8. #8
    rlbroerman
    Guest

    Re: list box (2007)

    I have a new problem. I want to be able to access a record by last name. This works in my form "frmPatientsHealth" but ican't get it to work in "frmPatients" . Can you help, please.
    Thanks.
    Rick B
    Attached Files Attached Files

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list box (2007)

    The After Update event procedure for cboLastName contains a line

    Me!cboSocSecNo = Me!cboLastName

    but there is no control named cboSocSecNo on the frmPatients form. The name of the relevant combo box is cboFindPatient, so you should change cboSocSecNo in the above line to cboFindPatient.

  10. #10
    rlbroerman
    Guest

    Re: list box (2007)

    This works great but only on the LastName combo box.
    If I change the FindPatient combo Box it doesn't change the name in the LastName combo box.
    What have I done wrong?
    Rick B
    Attached Files Attached Files

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list box (2007)

    In the After Update event procedure of cboLastName, you have a line to set the value of cboFindPatient:

    Me!cboFindPatient = Me!cboLastName

    But you don't have its counterpart in the After Update event of cboFindPatient to set the value of cboLastName.

    (Since the After Update events of the two combo boxes perform almost the same function, it would make sense to use more or less identical code; this would make the code easier to maintain)

  12. #12
    rlbroerman
    Guest

    Re: list box (2007)

    I tried what you suggested but I can't get the right ombination. Can you help, please.
    Rick B
    Attached Files Attached Files

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list box (2007)

    Please see my previous reply. You haven't even tried to do something with it, as far as I can see.

  14. #14
    rlbroerman
    Guest

    Re: list box (2007)

    Sorry,
    I tried various combinations and none seemed to work so I didn't change the attempt I last sent you.
    Rick B

  15. #15
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: list box (2007)

    So what exactly was the problem? I've described what you should do.

Page 1 of 3 123 LastLast

Posting Permissions

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