Results 1 to 2 of 2
  1. #1
    PoorBoy is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    14

    copy/pass value from Form(A) listbox(a) to another Form(B) listbox(b)


    i have 2 forms , form(A) and form(B)
    each form have a listbox, listbox(a) and listbox(b)
    and 1 button

    how do i copy/pass value from Form(A) listbox(a) to another Form(B) listbox(b) by just clicking a Add button

    thanks please help

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    are you copying the value, or are you copying the record.

    If both list boxes have the same data source and you're just trying to pass your 'current' record you should be able to do something like

    [forms]![secondaryformname]![secondaryformlistboxname] = [forms]![primaryformname]![primaryformlistboxname].

    If you're actually trying to add a record to a table then refresh the listbox on the secondary form in your on click event you'd have to:

    1. Append a record to the table that the secondary form list box is using as a record source
    2. Possibly issue a me.refresh command
    3. Issue a me.requery command of the secondary form list box.

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

Similar Threads

  1. option group pass different value to same listbox
    By ice051505 in forum Programming
    Replies: 11
    Last Post: 03-12-2013, 11:52 AM
  2. How to Pass ListBox to Function?
    By RedGoneWILD in forum Programming
    Replies: 4
    Last Post: 03-05-2013, 12:13 PM
  3. copy value from listbox to another listbox
    By PoorBoy in forum Forms
    Replies: 2
    Last Post: 03-05-2013, 10:14 AM
  4. Replies: 4
    Last Post: 02-14-2013, 09:33 PM
  5. How can I pass the value from a combo box to listbox
    By robertdbuckley in forum Programming
    Replies: 1
    Last Post: 05-24-2012, 08:43 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