Nancy,
Rather than using the ON KEY LABEL you might consider adding a "Close" button to FormB with its Cancel property set .t. ... pressing esc then has the same effect as pressing that button, so you can put code in the button's valid event to do as you please.
Re referencing the form: in your separate proc you can presumably refer to the form using _SCREEN.ACTIVEFORM so you don't have to worry about the form's object variable.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1