Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Escapeing from an add record function
Message
 
To
06/12/1998 09:06:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00164482
Message ID:
00164548
Views:
15
>>>>>Hello all!
>>>>>
>>>>>I have used the following valid function in VFP5 many times to cancel an "add" on a form in VFP5, but it doesn't seem to work in VFP6!
>>>>>The 'Return" function in the message box works fine, but the 'cancel'
>>>>>code acts justs like the Return...
>>>>>The code doesn't seem to be working right... can anyone tell me why its not canceling the add or maybe suggest another way to accomplish this?
>>>>>
>>>>>TIA, DAN
>>>>>
>>>>>***************************************
>>>>>*-- VALID() of EMP_No field
>>>>>
>>>>>SELECT employee
>>>>>Set Order to emp_no
>>>>>Seek this.Value
>>>>>
>>>>>IF FOUND()
>>>>>*-- Update these fields
>>>>> With thisform
>>>>> .txtEmp_name.value=employee.emp_name
>>>>> Endwith
>>>>>ELSE
>>>>>nanswer=MESSAGEBOX("EMPLOYEE # NOT FOUND.",21,"ENTRY ERROR")
>>>>> IF nanswer=4
>>>>> return 0
>>>>> else
>>>>> keyboard '{esc} {alt c}' &&&&& MY problem seems to be here!
>>>>> endif
>>>>>ENDIF
>>>>Dan,
>>>>I'll ask a stupid question. Is button designated as cancel = .t. ?
>>>>Cetin
>>>
>>>Please excuse my ignorance, but I didn't know that the message box had properties like .T. or .F. , only return codes. Can you tell me where to find them?
>>>
>>>Thanks,

Cetin,

For soem odd reason Pressing the ESCAPE key has no effect on the form... Set Escape on is checked in the options and I even have the command Et Escape ON in the form...
Bafffled,
Dan

>>
>>Another interesting thing I have discovered is that the ESC key doesnt allow me to quit the "add" when pressed. Maybe I dont have something set correctly?
>>I have tried Set Escape On in a number of places (page init) etc, but it doesnt seem to matter.
>>
>>Dan
>>
>>>Dan
>Dan,
>I didn't mean the messagebox button. Another button on form with cancel = .t.
>Keyboard "{esc}{alt c}" and Keyboard "{esc}"+"{alt c}" behave different :
>No button (menu) to activate on "alt c" :
>- "{esc}{alt c}" behaves as if spacebar is pressed (Escape sequence ?)
>- "{esc}"+"{alt c}" behaves Esc and alt c as if pressed seperately.
>(Spacebar acts as an "enter" on commandbuttons).
>
>There is button (menu) to activate on "alt c" :
>- If no button on form with cancel = .t. then Alt+C activates target button.
>- Else button with cancel = .t. is activated
>
>These are all I could find. OTOH I still use VFP5 and don't know what has changed with 6.
>PS:Since valid returning .t. and control would lose focus, what does esc do.
>Cetin
Dan Gilliland
ICQ# 15695715


"Man is still the most extraordinary computer of all."
John F. Kennedy (1917-1963)
Previous
Reply
Map
View

Click here to load this message in the networking platform