Hi Barbara --
>Great idea, John, but I think your EditValue_assign method will have to be a CASE statement with an entry for each value of tNewVal.
>
>This is a good way of combining code that is presently on 'your' Edit, Save, Cancel and Add buttons.
>
Whoops....you are right, of course. The amended code is below:
LPARAMETERS tNewVal
THIS.EditState=tNewVal
DO CASE
CASE tNewVal=0
CASE tNewVal=1
THIS.SetAll("Enabled",.T.)
THIS.Refresh()
CASE tNewVal=2
INSERT INTO table (field) VALUE (value)
ENDCASE
Thanks for pointing out my ommission!
------------------------------------------------
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