Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTC Listbox

Status
Not open for further replies.

david7777777777

Programmer
Sep 26, 2001
417
US
I have made an editable grid DTC as Merlin instructed. How do I get a listbox to display the current value in a field of a record instead of showing the last selected value in that list box when I go from one record to another?
 

If the properties of your databound listbox are properly set (Recordset field on General tab and Row Source,.. on LookUp tab have to be bound to 2 appropriate recordsets) and incorrect value is displayed in the listbox it probably means, that you open your recordsets after the creation of the Listbox. In this case you can set Listbox properties manually (for example in the thispage_onenter() event). The syntax is as follows:

ListBox1.setDataSource(recordset1)
ListBox1.setDataField("column_name")
ListBox1.setRowSource recordset2, "column", "bound_column"

hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top