jappy512 0 Newbie Poster

Hi guys good day

I'm currently working my first project in foxpro and still new to this language... I can't seem to get what is wrong with my code. All I want to do is to create a Defined menu and when you choose the Logout it will return you to Log in Screen, Select Exit and the program will close... Thanks in advance... By the way here's my code:

set talk off
clear

defi wind menu1 from 05,10 to 70,70 doub shad color W+/W*, W+/W*,W* title "SAMPLE PROGRAM 1"
acti wind menu1

DEFINE MENU menubar IN WINDOW menu1
DEFINE PAD filepad OF menubar PROMPT '\<File'   KEY ALT+F, ''
ON PAD filepad OF menubar ACTIVATE POPUP file
DEFINE POPUP file MARGIN RELATIVE SHADOW COLOR SCHEME 4

	DEFINE BAR 1 OF file PROMPT 'Log Out' 
	DEFINE BAR 2 OF file PROMPT 'Exit'
	
ON SELECTION POPUP ALL DO choice

ACTIVATE MENU menubar
PROCEDURE choice
CLEAR
 
DO CASE
	CASE PROMPT() = 'Log Out'
		DO Login
	CASE PROMPT() = 'Exit'
		exit
		
ENDCASE

WAIT WINDOW
RELEASE WINDOW menu1

RETURN