Brenda --
One of the problems with textboxes, comboboxes, editboxes (and some others) is that they don't lose focus when a toolbar button is clicked. Therefore, to enforce that the controlsource is set to the current value, in the Click of the button, you need something like:
cType=_SCREEN.ActiveForm.ActiveControl.BaseClass
IF INLIST(cType,"Textbox","Combobox","Editbox")
cSource= _SCREEN.ActiveForm.ActiveControl.ControlSource
tValue = _SCREEN.ActiveForm.ActiveControl.Value
REPLACE (cSource) WITH (tValue)
ENDIF
Of course, you'll want to add code to trap blank controlsources, null values, etc....
>doing a work around for validating from the cmdsave on the toolbar. because i call lastcontrol.valid myself, the controlsource is not updated with the value. want to update the controlsource with the value generically. do not want to change all my valid code, since it all references the controlsource now.
>
>do not want to actually update the controlsource, but the controlsource's value.
>
>controlsource = tablex.field1
>tablex.field1 = .t.
>
>want to set tablex.field1 = this.valuel
>
>any ideas?
>
>brenda
------------------------------------------------
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