You need to capture the [ESC} with the endkey variable which is the variable that comes after the response variable, as per syntax: Syntax
endkey Specifies the variable containing the final keystroke ([Enter] or [Esc]) in a dialog box. If the user hits the F1 key under R:BASE for DOS this will return HELP. Here is an example that I use that work fine: ============================================================ DIALOG 'PROCEED?' yes_no vcont YES IF (LUC(.yes_no) EQ 'NO' OR vcont EQ '[Esc]' ) THEN GOTO getopt ENDIF ============================================================ Javier Valencia, PE President Valencia Technology Group, L.L.C. 14315 S. Twilight Ln., Suite #14 Olathe, KS 66062-4571 (913)829-0888 (913)649-2904 FAX -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of marc schluter Sent: Tuesday, December 24, 2002 9:22 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Lastkey ... Hi all What am I missing? If the user clicks on Cancel, Lastkey is set to Enter. DIALOG 'Enter Patient Number' cust# = 8 + mylst 1 CAPTION 'Patient Number' AT 10,12 IF (LASTKEY(0)) = '[ESC]' THEN GOTO fcustend ENDIF thanks marc __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com

