2 Replies Latest reply on Jul 27, 2016 8:38 AM by christopher joseph

    Listbox selectiom

    christopher joseph

      How do i add and retrieve selections from a listbox on a form as it relates to a tdatabase ?

        • Re: Listbox selectiom
          Tom with Wiley

          Good Morning Christopher--I wasn't exactly sure what you were asking for, but I was able to find a solution to a similar question here:


          "Here's an example of how to populate a list box with data from the Northwind database which comes with MS Access. Coincidentally this was an exercise in Theron Willis' Beginning Visual Basic 2005 Databases (Chapter2, Exercise 1). Thanks to Mr. Willis for this book, it has been a great help to me!

          What this example is doing is opening a connection to the Northwind database, selecting the data from the FristName and LastName columns of the Employees table, and filling that data into a data table. I then use a For Each Next loop to iterate through each row in the data table to add the value in the FirstName and LastName column to the listbox.