Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working of if command
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01222882
Message ID:
01222955
Views:
15
>Raphael, I checked you all codes, thanks for your kindness.
>If two users, and two different password, how to implement.
>Simply, I want.
>I Click on a command button, and appear a form where i use these code,
>If instead of or ...
see if either of these ideas help you, or try Naomi's again.
*the variable feeuser needs to be setup prior to this code.
local cgoodusers
cgoodusers=("khubaib","abid")

IF thisform.text1.value=="123" AND INLIST(ALLTRIM(thisform.feeuser.value,cgoodusers))
	feeuser=thisform.feeuser.value
	DO FORM frsptc
	thisform.release
ELSE
	= messagebox('not allowed', 32, PRODUCT)
	thisform.release
	RETURN .T.
ENDIF
or
local cgoodusers, cmsgtxt
cgoodusers=("khubaib","abid")
cmsgtxt= " "
DO CASE
CASE !(thisform.text1.value == "123")
	cmsgtxt="invalid text value"
CASE !(INLIST(ALLTRIM(thisform.feeuser.value,cgoodusers)))
	cmsgtxt="invalid User name"
OTHERWISE
	WAIT WINDOW "ok" NOWAIT
ENDCASE
WAIT CLEAR
IF EMPTY(cmsgtxt)
	= messagebox(cmsgtxt, 32, PRODUCT)
ELSE
	feeuser=thisform.feeuser.value
	DO FORM frsptc
ENDIF
thisform.release
Previous
Reply
Map
View

Click here to load this message in the networking platform