Search This Blog

Showing posts with label clear events. Show all posts
Showing posts with label clear events. Show all posts

Log Out Code

PUBLIC pCurrUser
SELECT SviewAccess
=REQUERY("SviewAccess")
LOCATE FOR ALLTRIM(UserName) = ALLTRIM(pCurrUser)
IF FOUND()
REPLACE AccessStatus WITH "LOGOUT"
THISFORM.REFRESH
ENDIF

CLEAR EVENTS
ON ShutDown
QUIT

Close or Exit Code

Sometimes when you tried to exit or close the program but unsuccessfully close. Try below codes. This is due to the READ EVENTS that sre still running so you need to CLEAR EVENTS then QUIT.

CLEAR EVENTS
QUIT