PARAMETERS theusr, thepsw SET DEBUG ON SET STEP ON theusr=ALLTRIM(UPPER(TRANSFORM(theusr))) thepsw=ALLTRIM(UPPER(TRANSFORM(thepsw))) *Set Classlib To (addbs(oprop.appstartpath)+'prg\_crypt.vcx') ADDITIVE *MX=Createobject("_cryptApi") usertosearch=[] passwordtosearch=[] mx.encryptSessionSTreamString(theusr,[SSSoft786],@usertosearch) mx.encryptSessionSTreamString(thepsw,[SSSoft786],@passwordtosearch) usesafe('users') IF TYPE([validationofmainpage])=[U] PUBLIC validationofmainpage ENDIF validationofmainpage=.f. LOCATE FOR ALLTRIM(name)=usertosearch and password=passwordtosearch IF NOT EOF() For i=1 To Fcount() cvar="User_"+Field(i) Public &cvar &cvar=Evaluate(Field(i)) ** If topfile And Type(Field(i))="L" &cvar=.T. Endif ENDFOR If Type('user_pass')='C' Public the_pass the_pass='' mx.decryptsessionstreamstring(Users.Pass,"SSSoft",@the_pass) ENDIF validationofmainpage=.t. endif