Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working of if command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01222882
Message ID:
01222955
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform