PROBLEM WITH EDITBOX BELOW IS THE CODE, ANY SUGGESTIONS !!!!
Here's the code for the main menu (I don't know if it's a better idea to use a case statement, but i was just trying if out with a couple of pushbuttons)
;************* Main Menu *****************
proc main
integer status
string TextStr
dialogbox 0 10 20 328 159 3 "Query Main Menu"
text 1 47 8 224 11 "SMITH && DESHIELDS QUERY MENU" center
pushbutton 2 76 31 65 22 "LOOKUP"
pushbutton 3 232 74 70 21 "RECIEVED PO ?"
pushbutton 4 77 72 63 19 "QUOTE REPORT"
text 5 2 34 72 19 "VIEW ORDERS FOR CASH CUSTOMERS" center
text 6 159 76 70 18 "VIEW PURCHASE ORDER INFO" center
text 8 2 75 73 17 "VIEW QUOTES BY SALESMAN" center
pushbutton 9 241 128 59 18 "E&XIT" CANCEL
pushbutton 10 234 32 69 21 "VENDOR # BY PO"
text 11 167 36 62 19 "VIEW VENDOR ORDER #" center
enddialog
dlgevent 0 status
while ! ((status == 2)||(status == 3)||(status == 4)||(status == 9)||(status == 10))
dlgevent 0 status
endwhile
if status == 10 ;if CANCEL clicked exit script
exit
endif
;if status != 4 ;if OK clicked and textbox is empty
;if nullstr TextStr
;usermsg "No text entered." ;display message
;endif
;endif
if status == 2
isfile "L:\procommscripts\LOOKUP.WAX" ; Verifies that File does Exist.
if SUCCESS
execute "LOOKUP.WAX"
else
usermsg "Error opening file !!!!"
endif
endif
if status == 3 ; Verifies that File does exist
isfile "L:\procommscripts\PO.WAX"
if SUCCESS
execute "PO.WAX"
else
usermsg "Error opening file !!!!"
endif
endif
endproc
IF PUSHBUTTON 2 CLICKED THEN CALL THE FOLLOWING DIALOB BOX:
;******** CODE FOR THE LOOKUP DIALOG BOX **********
proc main
string TextStr
integer status
dialogbox 0 8 22 158 65 3 "Look Up Cash Customer"
text 1 13 2 142 11 "Enter customer's first or last name or address:" left
editbox 2 47 17 64 12 TextStr 0
pushbutton 3 22 36 50 12 "OK" OK DEFAULT
pushbutton 4 88 37 52 11 "Cancel" CANCEL
enddialog ;Exit dialog box
dlgevent 0 status
while ! ((status == 3)||(status == 4))
dlgevent 0 status
endwhile
if status == 4 ;if CANCEL clicked exit script
exit
endif
if status != 4 ;if OK clicked and textbox is empty
if nullstr TextStr
usermsg "No text entered." ;display message
endif
endif
if not nullstr TextStr ;if text box not empty
transmit "Q^M" ;take you to query screen
pause 2
transmit "LOOKUP^M" ;begin query report
pause 1
transmit TextStr
transmit "^M"
pause 1
transmit "T^M"
pause 30
if waitfor "SELECTION" ;if user quits and returns to main menu
exit ;stop script
else
; pause 5 ;else continue waiting and the rest of the code below will finish.
transmit "^M"
pause 0
transmit "Q^M" ;return to main menu
endif
endif
endproc
WHEN THE LOOKUP DIALOG BOX DISPLAYS IT HAS SIMILAR TO "|" IN BOLD AT THE EDITBOX WHERE THE BLINKING CURSOR IS. ANY HELP WILL BE GREATLY APPRECIATED, AND THANKS FOR REPLYING...
Here's the code for the main menu (I don't know if it's a better idea to use a case statement, but i was just trying if out with a couple of pushbuttons)
;************* Main Menu *****************
proc main
integer status
string TextStr
dialogbox 0 10 20 328 159 3 "Query Main Menu"
text 1 47 8 224 11 "SMITH && DESHIELDS QUERY MENU" center
pushbutton 2 76 31 65 22 "LOOKUP"
pushbutton 3 232 74 70 21 "RECIEVED PO ?"
pushbutton 4 77 72 63 19 "QUOTE REPORT"
text 5 2 34 72 19 "VIEW ORDERS FOR CASH CUSTOMERS" center
text 6 159 76 70 18 "VIEW PURCHASE ORDER INFO" center
text 8 2 75 73 17 "VIEW QUOTES BY SALESMAN" center
pushbutton 9 241 128 59 18 "E&XIT" CANCEL
pushbutton 10 234 32 69 21 "VENDOR # BY PO"
text 11 167 36 62 19 "VIEW VENDOR ORDER #" center
enddialog
dlgevent 0 status
while ! ((status == 2)||(status == 3)||(status == 4)||(status == 9)||(status == 10))
dlgevent 0 status
endwhile
if status == 10 ;if CANCEL clicked exit script
exit
endif
;if status != 4 ;if OK clicked and textbox is empty
;if nullstr TextStr
;usermsg "No text entered." ;display message
;endif
;endif
if status == 2
isfile "L:\procommscripts\LOOKUP.WAX" ; Verifies that File does Exist.
if SUCCESS
execute "LOOKUP.WAX"
else
usermsg "Error opening file !!!!"
endif
endif
if status == 3 ; Verifies that File does exist
isfile "L:\procommscripts\PO.WAX"
if SUCCESS
execute "PO.WAX"
else
usermsg "Error opening file !!!!"
endif
endif
endproc
IF PUSHBUTTON 2 CLICKED THEN CALL THE FOLLOWING DIALOB BOX:
;******** CODE FOR THE LOOKUP DIALOG BOX **********
proc main
string TextStr
integer status
dialogbox 0 8 22 158 65 3 "Look Up Cash Customer"
text 1 13 2 142 11 "Enter customer's first or last name or address:" left
editbox 2 47 17 64 12 TextStr 0
pushbutton 3 22 36 50 12 "OK" OK DEFAULT
pushbutton 4 88 37 52 11 "Cancel" CANCEL
enddialog ;Exit dialog box
dlgevent 0 status
while ! ((status == 3)||(status == 4))
dlgevent 0 status
endwhile
if status == 4 ;if CANCEL clicked exit script
exit
endif
if status != 4 ;if OK clicked and textbox is empty
if nullstr TextStr
usermsg "No text entered." ;display message
endif
endif
if not nullstr TextStr ;if text box not empty
transmit "Q^M" ;take you to query screen
pause 2
transmit "LOOKUP^M" ;begin query report
pause 1
transmit TextStr
transmit "^M"
pause 1
transmit "T^M"
pause 30
if waitfor "SELECTION" ;if user quits and returns to main menu
exit ;stop script
else
; pause 5 ;else continue waiting and the rest of the code below will finish.
transmit "^M"
pause 0
transmit "Q^M" ;return to main menu
endif
endif
endproc
WHEN THE LOOKUP DIALOG BOX DISPLAYS IT HAS SIMILAR TO "|" IN BOLD AT THE EDITBOX WHERE THE BLINKING CURSOR IS. ANY HELP WILL BE GREATLY APPRECIATED, AND THANKS FOR REPLYING...