>** 'Turned Over for Collection' >@ 19 * row_incr, 41 GET COLLECT ; > FUNCTION '*C ' + ALLTRIM( s1_prompt[ 22 ] ) ; > VALID v_collect() ; > COLOR ,,,,,,,,&control1_color,&disabl1_color >You can check the value of ReadKey() in v_collect. IIRC, it should be 13 (wrong, it's 15 - see below) if the exit key was Enter (but better check yourself, or ... here are some relevant scraps from my oooooold code:
#define def_okkeys 15, 271, 5, 261, 7, 263, 1, 257, 3, 259, 8, 264, 270 Case Inlist(_u_readk, def_okkeys) * enter (15+256) pgdn (7+256), ctrl+W (270), tab (5, 261)Also, there was an extended set of values
Func u_rkext para __rk && passed by ref! _u_rkext=Readkey(1) * 0 None of the following - zero if nothing happened If _u_rkext > 1 Do Case * 6 READ timed out, __rk is 20 or 276 Case Inlist(_u_rkext,6) __rk=20 * 5 DEACTIVATE clause returned .T., 6 READ timed out Case Inlist(_u_rkext,1,5) __rk=12 * 2 CLEAR READ issued Case _u_rkext=2 __rk= 12 * 4 READ window closed * 3 Terminating control chosen - enter implied Case Inlist(_u_rkext,3,4) __rk=15 Endcase Endif (_u_rkext > 1) retu _u_rkextI don't exactly remember in which cases does it return regular value + 256... I figure you can always check just bitand(readkey(), 255).