Results 1 to 2 of 2

Thread: list box code

  1. #1
    Join Date
    Oct 2011
    Posts
    5

    Unanswered: list box code

    list box code....
    i have 2 list boxes...list91 & List93
    I want to have it so if u select a the first item in list91 it automatically selects the first item in list93, if u select the second item it selects the 2nd item, if u select the third...u get the point...is there vba code i can use for this?

    also is there a way to make it so u can scroll to the right in a list box....all my items are small exept for a few, and i dont want to have a giant list box so ide liek to give the option to scroll to the side to read certain ones. THANKKKSSSS

  2. #2
    Join Date
    Oct 2009
    Posts
    340
    ok - well to a database there is no such thing as "first" or second....there is only a record ID......it is the sort that makes things appear first or second to the human - the database doesn't care.

    so when you select a record in listbox 1 then that listbox has a bound value. Assuming you have that exact same value in the records of listbox 2 then you can make listbox 2 have the same value as well.

    in the AfterUpdate event of listbox 1 you put:
    me.Listbox2=me.listbox1

    hope it helps...
    www CahabaData com

Posting Permissions

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