Thanks for all the response I received in regards to my question on
GETDATE.  I have the below code in a bit button.  

This code works fine when I trace it in the RBEDITOR but comes up with a
SET error when run on the form.

The error occurs when I hit the cancel or escape button on the GETDATE
function.

As you can see, the GETDATE function is nested in the WHILE loop.

 

SET VAR Date_A DATE = NULL

SET VAR Date_B DATE = NULL

SET VAR vAbort INT = 0

SET VAR vMsg TEXT

SET VAR vMsg2 TEXT

 

WHILE CONT_PROMPT = 'Y' THEN

         My code

This works fine!

IF vYesNo = 'No' THEN

           SET VAR vAbort = 1

           PAUSE 2 USING 'OPPERATION ABORTED!'

           BREAK

        ENDIF  

 

This part gives the error when I hit cancel or escape (while in the
form).  Works fine in the RBEDIT mode.

        SET VAR Date_A = (GETDATE('Pick Processing Start Date'))

            IF Date_A IS NULL THEN

            SET VAR vAbort = 1

            PAUSE 2 USING 'OPPERATION ABORTED! NO DATE PICKED.'

            BREAK

            ENDIF

ENDWHILE

CLS

IF vAbort = 1 THEN

   CLEAR VAR Date_A,Date_B,LAST_DATE,CONT_PROMPT,CONT_PROMPT2, +

   vmsg,vMsg2,VLAST_DATE,vYesNo,vEndKey,USER_CHECK,vabort

   RETURN

   CLS

ENDIF

CLEAR VAR
LAST_DATE,CONT_PROMPT,CONT_PROMPT2,vmsg,vMsg2,VLAST_DATE,vYesNo,vEndKey

 

Any help appreciated.

 

Jim

Reply via email to