Change Password

G

Guest

I have password for each user on a system. The password is written in a
table and I would like each user to change their passwords. I have written a
form when the user can enter his name then his password and a new password.
I don't how to confirm his new password. I think I must write VBA codes but
don't know how to write this confirmation message where he must re-enter his
password.

Can somebody help me.
Thanks,
Danie
 
A

Arvin Meyer [MVP]

Access (and in fact Windows) data is not normally case sensitive. You can
change that with a module declaration of Option Compare Binary, so create a
new standard module which you can call something like basPassword. Then
write something like this (aircode):

Option Compare Binary

Public Function TestPword(strP1 As String, strP2 As String) As Boolean
If strP1 = strP2 Then
TestPword = True
Else
TestPword = False
End If
End Function

Assuming that your table lookups have passed, you can test like:

If TestPword([FirstTextbox],[SecondTextBox]) = True Then
' Do something
Else
MsgBox "Passwords not the same, try again", vbOKOnly, "Password Error"
End If
 
G

Guest

Thank you so much I will try.

Arvin Meyer said:
Access (and in fact Windows) data is not normally case sensitive. You can
change that with a module declaration of Option Compare Binary, so create a
new standard module which you can call something like basPassword. Then
write something like this (aircode):

Option Compare Binary

Public Function TestPword(strP1 As String, strP2 As String) As Boolean
If strP1 = strP2 Then
TestPword = True
Else
TestPword = False
End If
End Function

Assuming that your table lookups have passed, you can test like:

If TestPword([FirstTextbox],[SecondTextBox]) = True Then
' Do something
Else
MsgBox "Passwords not the same, try again", vbOKOnly, "Password Error"
End If
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Danie said:
I have password for each user on a system. The password is written in a
table and I would like each user to change their passwords. I have
written a
form when the user can enter his name then his password and a new
password.
I don't how to confirm his new password. I think I must write VBA codes
but
don't know how to write this confirmation message where he must re-enter
his
password.

Can somebody help me.
Thanks,
Danie
 
G

Guest

Danie said:
Thank you so much I will try.

Arvin Meyer said:
Access (and in fact Windows) data is not normally case sensitive. You can
change that with a module declaration of Option Compare Binary, so create a
new standard module which you can call something like basPassword. Then
write something like this (aircode):

Option Compare Binary

Public Function TestPword(strP1 As String, strP2 As String) As Boolean
If strP1 = strP2 Then
TestPword = True
Else
TestPword = False
End If
End Function

Assuming that your table lookups have passed, you can test like:

If TestPword([FirstTextbox],[SecondTextBox]) = True Then
' Do something
Else
MsgBox "Passwords not the same, try again", vbOKOnly, "Password Error"
End If
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Danie said:
I have password for each user on a system. The password is written in a
table and I would like each user to change their passwords. I have
written a
form when the user can enter his name then his password and a new
password.
I don't how to confirm his new password. I think I must write VBA codes
but
don't know how to write this confirmation message where he must re-enter
his
password.

Can somebody help me.
Thanks,
Danie
Hi Arvin,

How do I ask to confirm the new password once they have entered the new one.

The info I have on my form is :

Name .....................
Password ...............
New Password ................ Once they enter the New Password I must ask
them to confirm. Thanks for your help.
Danie
 
A

Arvin Meyer [MVP]

Hi Arvin,

How do I ask to confirm the new password once they have entered the new
one.

The info I have on my form is :

Name .....................
Password ...............
New Password ................ Once they enter the New Password I must ask
them to confirm.

In the AfterUpdate event of the new password textbox control, you can ask,
but just providing a second textbox to confirm is usually all that is
necessary. If they don't match, (and they won't unless it is entered) they
will be prompted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top