General information
Category:
Forms & Form designer
Title:
VFP 8.0 form error - newbie question
hi guys, i have been struggling on what is probabaly a really silly question. i have two forms. formA is the main form and calls form B. all i want to do is set it so that if a user hits the ESC key on formB it simply calls a procedure in a .prg file that closes formB and returns to formA.
formB activate method contains:
ON KEY LABEL ESC DO p_esc
the .prg code looks like this:
PROCEDURE p_esc
formB.release
m_exitreason = 12
RETURN
when i run it and press ESC i get an error on the "formB.release" line. "object formB is not found". for reasons that i don't want to have defend :), i would like to keep the code that closes formB in the .prg procedure file.
i did verify that _screen.activeform.name did indeed return "formB", and i have set the "name" of formB to "formB".
thanks,
n.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only