Im a trainee programmer and have been given a V.B database project. The only problem is that I don't know how to link listboxes to databases!! Please help me so that I can get a job!!!
Printable View
Im a trainee programmer and have been given a V.B database project. The only problem is that I don't know how to link listboxes to databases!! Please help me so that I can get a job!!!
Hi gilly
There are two ways you can get a list box to connect to a database.
One.
You can make a ADO/DAO data control and bind the list box to it using the datamember and datasource properties of the list box.
Two.
you can create a recordset at runtime and populate it throught code.
Mylistbox.Clear
While Not Myrecordset.EOF
Mylistbox.AddItem Myrecordset("MyField")
Wend
Either way you get the same affect
Hope this helps
Ian
Thank-you for your help. My chances of employment are not looking so bleak now!!!!!!