Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another Cheezy Tip of the Week (VFP6)
Message
From
12/07/1998 21:38:13
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00116665
Message ID:
00116667
Views:
14
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   && No edit state
   ***--- Code for not editing and not adding
CASE tNewVal=1   && Editing
   THIS.SetAll("Enabled",.T.)
   THIS.Refresh()
CASE tNewVal=2
   INSERT INTO table (field) VALUE (value)
   ***--- More append code
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform