Results 1 to 5 of 5
  1. #1
    jhargram is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    40

    Update Column from Multi-select listbox

    Hi All, I want some help regarding "Update column from multi-select listbox". Actually i have 2 table.


    1. tblUser: user_id(column1),user_name(column2)
    2. tblTask: task_id(column1),user_name(column2)

    I fave 1 form whare i have one listbox. it shows userdetails means usernames. and i have one command button "UPDATE"

    I assume that in tblTask have 100 records and tblTask.username=null. and in tbluser i have multiple user.




    ...So how i update (through query or code(vba)) like

    After Update (tbltask)

    task_id Task Details user_name
    1 a User1
    2 b User2
    3 c User3








    Thanks in advance....

  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
    I'm not clear on the question. Is this what you want?

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

  3. #3
    jhargram is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    40
    If you see tha attached access file and if you open Allocation formyou can see there i have two listbox.
    1. User (multiselect)
    2. Task


    and I have one commandbutton (submit)


    My question is if i select more then 1 user from userlist and if I select one task there and press submit then it should update in tbl_task.




    Like exm:
    In tbl_task there are 4 "xxx". Now if i select "abc" and "bcd" from userlist and from task if I select "xxx" and press submit button then in tbl_task it should update in user "abc" first2 "xxx" and last2 "xxx" as user "bcd"
    Attached Files Attached Files

  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
    What rules determine which records get updated to which user? What if 3 users were selected? We need a set of rules to follow to guide the code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    jhargram is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    40
    Thanks pbaldy for response, Actually it should come like total task divided into selected username.

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

Similar Threads

  1. Replies: 7
    Last Post: 11-24-2014, 02:11 PM
  2. Need Multi-Select listbox code example
    By Buakaw in forum Forms
    Replies: 4
    Last Post: 08-21-2011, 08:37 PM
  3. multi-select listbox and new entry button
    By user622 in forum Forms
    Replies: 2
    Last Post: 07-05-2011, 09:14 AM
  4. Replies: 3
    Last Post: 06-22-2011, 08:51 AM
  5. Multi-select listbox and update flag in table
    By Suresh in forum Programming
    Replies: 0
    Last Post: 12-19-2007, 01:04 AM

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