Hi Barry,
>
> The code is simple and straghtforward:
>
>Thisform.Visible = .T.
>Select SelHdr
>Locate for Selhdr.Invid = thisform.list1.value
>If found() && (and it always does find it)
>thisform.refresh
>else etc.........
>
>Why does this work ONLY in the Trace mode? I'm using VFP 5.0. I've placed the code in the Command button click and also tried it in the Lost Focus Method of the ListBox. Doesn't seem to make a difference. I even tried a timeout instruction before the Refresh whcih also didn't work.
>
>I know I must be missing something here but can't seem to find it. Any help would be very much appreciated.
I think that at the time of the Click() event the Value property of the List is not updated yet. You can add a This.Value = This.Value in the Click event to force the update, I believe.
HTH,
Bill Armbrecht
VFP MCP