>Hi,
>
>I have a form that contains a combobox, listbox and some text fields. The InterActiveChange Event of the combobox creates a cursor containing addresses based on the selected value of the combobox and then sets the rowsource of the listbox to this cursor. When the user selects one of the addresses in the listbox the text fields are enabled and filled with information specific to the selected address.
>
>The combobox events seem to work fine. The listbox is populated with the right information. However, when I select one of the addresses in the listbox the address reverts back to the address from the previous combobox selection. The weird thing is that the information in the textboxes is the correct information and when I change the focus from the listbox the address changes back to the correct address. Everything works fine until I make another selection from the combobox.
>
>Hope this makes sense! Any suggestions as to what would be causing this would be greatly appreciated.
>
>Thanks in advance,
>Russell
Russell,
What about setting RowSource of listbox to an SQL and requery. ie (sort of):
with this
.RowSourceType = 3
.RowSource = 'select myDisplayFields,IDField '+;
' from myTable'+;
' where myField = thisform.ComboName.Value'+;
' into cursor crsListBox'
.ColumnCount = 1
endwith
=Seek(crsListbox.IDField,'myAddressTable','IDTag')
thisform.refresh
with this.parent.listboxname
.requery
.listindex = 0
endwith
Cetin