Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Case Specific Password

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don - 30 May 2007 19:34 GMT
I have a form with two controls that is formatted as a "Password".  I use the
second control as a confirmation that the user has typed in the correct
password in the first control.  It works fine, except it allows the second
password even if the user did not type in the same case--upper or lower.  How
can I enforce my database to require the password to be case specific?

Thank you
Signature

Don Rountree

BruceM - 30 May 2007 20:04 GMT
You can use the StrComp function, with vbBinaryCompare:

'  Check to see if the two passwords contain the same characters
If StrComp(Me.txtPswd1,Me.txtPswd2,vbTextCompare) = 0 Then
   '  Check to see if the two passwords have the same case
   If StrComp(Me.txtPswd1,Me.txtPswd2,vbBinaryCompare) <> 0 Then
       MsgBox "Passwords don't match"
       Me.txtPswd1 = Null
       Me.txtPswd2 = Null
   End If
End If

This is untested code.  See VBA Help for more information about StrComp.

>I have a form with two controls that is formatted as a "Password".  I use
>the
[quoted text clipped - 5 lines]
>
> Thank you
Don - 30 May 2007 20:20 GMT
Thank you.
Signature

Don Rountree

> You can use the StrComp function, with vbBinaryCompare:
>
[quoted text clipped - 19 lines]
> >
> > Thank you
Maurice - 30 May 2007 20:07 GMT
Don,

Maybe something like this:

if strComp(password, userpassword, vbBinaryCompare)<>0 then
..... your code here.
end if

where password is the password which the usere entered and userpassword is
the password to compare it with.

Signature

Maurice Ausum

> I have a form with two controls that is formatted as a "Password".  I use the
> second control as a confirmation that the user has typed in the correct
[quoted text clipped - 3 lines]
>
> Thank you
Don - 30 May 2007 20:20 GMT
Thank you.
Signature

Don Rountree

> Don,
>
[quoted text clipped - 14 lines]
> >
> > Thank you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.