CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 1999
    Location
    VA, USA
    Posts
    8

    Dynamic Updation of List Box

    Hi,

    I am working on a project in MS-Access. I have a form with 2 list boxes. Based on the selections in the first list box, the second list box has to be dyanamically updated with values from a field in the database. How can I add/ delete items in the list box at run time? Unlike VB which has an additem method for a list box, VBA doesn't support this method. Any suggestions on this are welcome.

    Thanks in advance.
    Nandini


  2. #2
    Join Date
    Dec 1999
    Location
    Tel Aviv, Israel, Earth, Solar System
    Posts
    50

    Re: Dynamic Updation of List Box

    Just a suggestion:check if List1_Changed method is available

    Jean
    [email protected]

  3. #3
    Guest

    Re: Dynamic Updation of List Box

    Hi,
    U can use this. If U have two list/comboboxes. set the second combobox's row source as the sql statement in the first combo's lost focus event.

    Combo4.RowSource = "select statement" & combo1.value ' use it as required.
    Combo4.Requery

    Hope this will help. If U require any more mailme at [email protected].
    Thanks
    Srinivas



Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured