Hi all,
I have a table of customer info (cust. no, name, address, etc). I have created a lookup form with an incremental search combo box (RowSource=Cust_Ship_To.custno,custname and RowSourceType=6), text boxes for the name and address stuff. Then I added two option buttons designed to change the index order of the table (Ship To and Name).
In the InteractiveChange event for the combo box, I have Thisform.refresh().
In the Click event for the buttons, I have
*****BUTTON 1
Set order to custno
go top
ThisForm.combo2.ColumnWidths="62,190"
ThisForm.combo2.RowSource=Cust_Ship_To.custno,custname
ThisForm.Refresh()
ThisForm.combo2.SetFocus()
*****BUTTON 2
Set order to custname
go top
ThisForm.combo2.ColumnWidths="190,62"
ThisForm.combo2.RowSource=Cust_Ship_To.custname,custno
ThisForm.Refresh()
ThisForm.combo2.SetFocus()
Here is the catch....when I select one of the option buttons, the table is reordered, the pointer moves to the top of the indexed table and the text boxes fill with the right information. But the *% combo box does not move to the top of the indexed table??
The combo box, when used alone, works fine.
Any thoughts??
TIA,
Phil Thomas
http://phillipdthomas.comNever let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....