Jason:
1.) What do you mean when you say the GET command does not disappear from the screen once selected?
2.) I had various problems with POPUPs so I just created a BROWSE window to present the choices to the client. I created a PROCEDURE that creates a WINDOW that a BROWSE is done in. Here's the code;
PROC p0validrsn
PARA mxkey, esc_ok
malias = ALIAS()
SET NEAR ON
SEEK ALLTRIM(mxkey)
SET NEAR OFF
DEFINE WINDOW wvalid FROM 5,45 TO 22,71 ;
TITLE ' [ VALID REASONS ] ' COLOR SCHEME 10
DO WHILE .t.
IF mesc_ok
WAIT WINDOW 'Please select a valid REASON code. NO-CHOICE.' NOWAIT
ELSE
WAIT WINDOW 'You must select a valid REASON code.' NOWAIT
ENDIF
?? CHR(7)
ON KEY LABEL ENTER KEYB '{CTRL+W}'
SELECT spresnin
BROWSE FIELDS reason NOEDIT NODELETE WIND wvalid
ON KEY LABEL ENTER
IF LASTKEY() = 27 .AND. ! mesc_ok
LOOP
ENDIF
EXIT
ENDDO
RELEASE WINDOW wvalid
STORE IIF(LAST()=27,SPACE(LEN(reason)),reason) TO mxkey
IF LEN(malias) > 0
SELECT &malias
ENDIF
WAIT CLEAR
RETURN mxkey
The code assumes you have an INDEX TAG (or stand-alone index file) based on the key field the user is selecting. You could or course, nullify this requirement by creating a SQL query and ORDERing by the key field your user is looking to pick a value for.
Anyway, this is the method I chose - it's been working fine for about 7-8 years.....
Bill
Previous
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