Welcome to SPN

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

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution   

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
    Guest

    Hi,
    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
    New_Business.NB_ID=tbxNB_ID;"

    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

    Matt
     
    #1 Guest Poster, Jul 28, 2006
    Last edited by a moderator: Dec 11, 2008
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page