Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert string to numbers for password check 1

Status
Not open for further replies.

jerseyboy

Technical User
Mar 7, 2002
127
US
Hello,
I would like to compare two user ented passwords to determine if they are equal.
I would like to convert them to numbers so I can check for case sensitivity.

The 'code' function is not reconized in VBA as far as I can tell. I am sure this is probably basic coding, but the search function appears to be down.

Thanks for you help JerseyBoy
Remember: self-praise is no recommendation
 
Try this code:

If Asc(Me!Password1) <> Asc(Me!Password2) Then
MsgBox &quot;Passwords not equal.&quot;
Else
MsgBox &quot;Passwords equal.&quot;
End If

If Password1 = Test and Password2 = test, the message is that they are not equal.

Good luck!
Anthony J. DeSalvo
President - ScottTech Software
&quot;Integrating Technology with Business&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top