Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Escapeing from an add record function
Message
 
À
06/12/1998 09:06:06
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00164482
Message ID:
00165623
Vues:
10
Cetin,

Many thanks for you help and advice with this problem. I finally found what was causing my problem, and it was simply a Lostfocus() event that was causing a loop that I was unable to escape from...after removeing it, everything works fine now!

Thanks again,
Dan

>>>>>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,
>>
>>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform