Hi,
This is just something simple that im sure you can all answer.
In access you can create a list box and set its Row Source to look up a query.
How is this done in VB.
Cheers
Printable View
Hi,
This is just something simple that im sure you can all answer.
In access you can create a list box and set its Row Source to look up a query.
How is this done in VB.
Cheers
You can bind a list (any type of list, including a DataTable) to a ListBox via its DataSource property. Populating that DataTable from a database is a completely independent operation.
http://www.vbforums.com/showthread.php?t=469872
Thanks,
So you can bind a listbox to a query in your data source?
No. As I have already said, you can bind a ListBox to a DataTable that contains data. Populating that DataTable from a database using a query is a completely separate operation that I have exemplified in the thread I provided a link to.Quote:
Originally Posted by mrmojorisin
The ListBox doesn't care where the data in the DataTable came from, or even if the list it's bound to is a DataTable. Data-binding and data access are two separate things that are often used together because displaying data from a database is often a desirable thing to do.