Results 1 to 11 of 11
  1. #1
    MJeanBap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    16

    List Box Selections


    I created a form that upon entry the data is stored on a table. One of the selections on the form is a listbox. How can I get their multi-selections to show up on a table where the data will be stored? Thank you.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    One way, presuming your structure is compatible.

    http://www.baldyweb.com/MultiselectAppend.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    MJeanBap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    16
    That was a little helpful. Using the database you provided, in tblOtherTable, is there a way to have multiple employees shown under empID's (separated by commas) or in separate columns rather than rows?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sure, but it would violate normalization rules:

    http://support.microsoft.com/default...b;en-us;210203
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    MJeanBap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    16
    I see. Then that isn't the best option for me considering sorting and analyzing is something I'd like to do with the data. I think my best bet is to create a subform.

  6. #6
    MJeanBap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    16
    Would you agree? If so, is there a way to create a list box inside a subform?

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sure, a subform is the common way of presenting one-to-many related data. You can have a listbox on any form, whether it's a subform or not.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    MJeanBap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    16
    Ok, thanks! I left the form as is for now as I do not want to violate normalization rules. I tried to attach what I am working on but the file is too large? On my Form, I would like the list box to refesh each time a selection and value is "added" by the user. This way users have the option of making another selection, if need be.

    I created a table (tblCancerSites) the data will go into, but I also need it to be associated with the record somehow (maybe by assigning some sort of record number), so I know what record or form it's associated with. Could you walk me through what needs to be done? Thank you.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you try to compact/repair, then zip?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    MJeanBap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    16
    Hopefully this works.

    So upon selection of a cancer site/type and a value, and the user will click "ADD" so data can be added to the tblCancerSites. The user should be able to make another selection if they would like so I'd like to clear the selections so additional can be made once 'add' is clicked. I started on some of the coding but it isn't accurate. The data from this selection is to be entered on tblCancerSites. Just so I know which record it's associated with, I've added 'assigned number' to the table, which is on the form.

    Then, the information on suspect cases subform, should not be transferred from one record to another. This info on the subform should be found on tblSuspectCases. Just so I know which record it's associated with, I've added 'assigned number' to the table.

    Thank you!
    Attached Files Attached Files

  11. #11
    MJeanBap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    16
    Does anyone have any suggestions on how I could accomplis this? Thanks!

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

Similar Threads

  1. Handling Multiple Selections in a List Box
    By Zetony in forum Access
    Replies: 2
    Last Post: 11-02-2011, 02:21 PM
  2. Replies: 2
    Last Post: 05-27-2011, 08:12 AM
  3. Replies: 9
    Last Post: 05-23-2011, 06:12 PM
  4. Multiple Selections from a List Box
    By oleBucky in forum Forms
    Replies: 4
    Last Post: 05-06-2011, 08:24 AM
  5. Clear selections from a List Box?
    By Dreams2Fly in forum Forms
    Replies: 3
    Last Post: 03-28-2011, 02:25 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