Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Populating and Pre-Selecting a List Box

Discussion in 'Information Technology' started by Guest Poster, Jul 28, 2006.

  1. Guest Poster

    Guest Poster
    Expand Collapse

    I have a listbox that i populate using VBA with the statement:

    lstFunctions.RowSource = "SELECT Function_Name FROM Functions_Impacted"

    I want to have the items in the listbox already selected to represent
    the data held in a db table using this query:

    "SELECT Function_Name FROM Functions_Impacted INNER JOIN
    (Multiple_Functions_Impacted INNER JOIN New_Business ON
    Multiple_Functions_Impacted.NB_ID=New_Business.NB_ID) ON
    Functions_Impacted.FUNC_ID=Multiple_Functions_Impacted.FUNC_ID WHERE

    DB Structure:

    Functions_Impacted Table - FUNC_ID(PK), Function_Name
    Multiple_Functions_Impacted Table - NB_ID(PK), FUNC_ID(PK)
    New_Business Table - NB_ID(PK), other information fields

    On the Form, tbxNB_ID holds the value New_Business.NB_ID for the
    current record

    How do I make the items in the list be selected when navigating through
    the records?

    How do I use the multiple selection list box to update the
    Multiple_Functions_Impacted table?

    Thanks in advance

    #1 Guest Poster, Jul 28, 2006
    Last edited by a moderator: Dec 11, 2008

Share This Page