Compare two text box on vb6 form (1 Viewer)

drp

Registered User.
Local time
Today, 06:31
Joined
Dec 4, 2010
Messages
16
Hi
now i have problem with vb6 form

my vb6 form have three text box controls one is strHex not attached to data control, but getting text value (hex value) of second control named strobj . I want to explain more- "strobj" text box contains decimal value i.e hard drive serial no., "strHex" text box is value converted to hexadecimal from "strobj" . Thus "Strobj" text box fill with the hard drive serial no. On form open event.and simultaneously "strHex" filled with hex value of "strObj". My third text box named "strpass" is attached to data control say data1: recordSource- user.mdb; table-user; field-obj. My idea is when vb form load it check values from "strHex" and "strpass" text box and if both values matches exactly then unload form and open form say Main form . For this purpose i have following code in form load event

If strHex.text = strPass.text Then
Unload Me
main.show
else
MsgBox "unathorised access"
end if

now my problem is that though both the values of strpass and strHex are same the form cant unload and poping msgbox that unautorised access. What i doing wrong i dont understand pls help me sort out this problem .

I think i am doing someting wrong with data control.
Please help somebody
Waiting for early response
Thanks in advance
 

Users who are viewing this thread

Top Bottom