Hi Gar ---
I have seen two solutions to this problem, one involving ActiveControl.LostFocus and the other is to do a REPLACE of the table.field of the ActiveControl.ControlSource with ActiveControl.Value if ActiveControl.BaseClass INLIST("TextBox","EditBox","ComboBox")...
The other solution was a bit more elegent but escapes me......
>I have what seems to be a standard problem -- only the standard fix is not working for me.
>
>I have a formset which includes a toolbar -- "save" button is on the toolbar which does an tableupdate() wrapped in a transaction.
>
>When a user clicks on the save button, the value of the current control is lost.
>
>Of course I tried putting _Screen.Activeform.activecontrol.setfocus() in the click methods of both the toolbar and save button. No joy. I thought maybe there was a reference problem -- so far test purposes I hard coded to following to prevent the revert in only one control:
>
>frmsuppliers.frmdata1.txerr1.setfocus() && SET FOCUS ON ACTIVE CONTROL
>This is in the click event of both the toolbar and save button within the toolbar. The control the user is in when save is clicked still reverts if the user has not pressed enter or moved to another control before saving.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05