Password Change

G

Guest

My Change Password form does not work and I really need to deploy this db!
After the new password and confirm are both entered and the Submit command
button is clicked a moduel is used to update the password.
Below, are my Submit (command button) code and the module code.

The results are: "Please complete all entries before submitting your new
password"

I don't understand why it loops back instead of moving on to open the next
form (f_Splash).

Private Sub cmdSubmit_Click()
Dim UpdatePW As New ChangePADPW

If Me.filledCheck = False Then
MsgBox "Please complete all entries before " & _
"submitting your new password.", vbInformation, _
"Provider Appeals Database (PAD)"
ElseIf txtPassword <> txtConfirm Then
MsgBox "Password and Confirm Password do not " & _
"match. Re-enter one or both.", vbInformation, _
"Provider Appeals Database (PAD)"
Else
UpdatePW.NewPW cboUser, txtPassword
End If

End Sub

Private Sub GoIn()
DoCmd.openform "f_Splash"
End Sub

Private Sub Form_Load()
End Sub

/////////////////

Sub NewPW(eid As Long, NuPassword As String)
Dim cmd1 As Command
Dim strSQL As String

Set cmd1 = New ADODB.Command
cmd1.ActiveConnection = CurrentProject.Connection

strSQL = "UPDATE t_Users " & _
"SET t_Users.Password = """ & NuPassword & """ " & _
"WHERE RACFID=" & eid & ";"
Debug.Print strSQL

cmd1.CommandText = strSQL
cmd1.CommandType = adCmdText
cmd1.Execute

MsgBox "Your new password is accepted. or " & _
"Exit this form.", vbInformation, _
"Provider Appeals Database (PAD)"

End Sub
 
S

Stefan Hoffmann

hi Dan,
The results are: "Please complete all entries before submitting your new
password"

I don't understand why it loops back instead of moving on to open the next
form (f_Splash).

Private Sub cmdSubmit_Click()
Dim UpdatePW As New ChangePADPW

If Me.filledCheck = False Then
Where do you set filledCheck = True?

It seems neither to be calculated nor to be set manually.
MsgBox "Please complete all entries before " & _
"submitting your new password.", vbInformation, _
"Provider Appeals Database (PAD)"
ElseIf txtPassword <> txtConfirm Then ....
End If

End Sub


mfG
--> stefan <--
 
G

Guest

This is the code before it, I though it was being set.
How else can I add: set filledCheck = True?

Public Property Let filledCheck(vntNewValu)
If (IsNull(cboUser) Or cboUser = "") Or _
(IsNull(txtPassword) Or txtPassword = "") Or _
(IsNull(txtConfirm) Or txtConfirm = "") Then
AllFilled = False
Else
AllFilled = True
End If
End Property

Public Property Get filledCheck()
filledCheck = AllFilled

End Property


Thanks for the help.
 
G

Guest

Could you Please help me set the data...





Dan @BCBS said:
This is the code before it, I though it was being set.
How else can I add: set filledCheck = True?

Public Property Let filledCheck(vntNewValu)
If (IsNull(cboUser) Or cboUser = "") Or _
(IsNull(txtPassword) Or txtPassword = "") Or _
(IsNull(txtConfirm) Or txtConfirm = "") Then
AllFilled = False
Else
AllFilled = True
End If
End Property

Public Property Get filledCheck()
filledCheck = AllFilled

End Property


Thanks for the help.
 
S

Stefan Hoffmann

hi DAn,
This is the code before it, I though it was being set.
How else can I add: set filledCheck = True?

Public Property Let filledCheck(vntNewValu)
If (IsNull(cboUser) Or cboUser = "") Or _
(IsNull(txtPassword) Or txtPassword = "") Or _
(IsNull(txtConfirm) Or txtConfirm = "") Then
AllFilled = False
Else
AllFilled = True
End If
End Property
Who wrote that piece of code?

Use the following:

Public Property Get filledCheck()

filledCheck = (IsNull(cboUser) Or cboUser = "") Or _
(IsNull(txtPassword) Or txtPassword = "") Or _
(IsNull(txtConfirm) Or txtConfirm = "")

End Property

mfG
--> stefan <--
 
G

Guest

The results are the same with the code you suggested:
"Please complete all entries before submitting you new password"

I still cannot see why it loops back instead of moving on to open the next
form...

Any other ideas???
Thanks
 
S

Stefan Hoffmann

hi,
I still cannot see why it loops back instead of moving on to open the next
form...
Debug it.

Private Sub cmdSubmit_Click()
Dim UpdatePW As New ChangePADPW

'set a break point on the line below
If Me.filledCheck = False Then
MsgBox "Please complete all entries before " & _
"submitting your new password.", vbInformation, _
"Provider Appeals Database (PAD)"
ElseIf txtPassword <> txtConfirm Then
MsgBox "Password and Confirm Password do not " & _
"match. Re-enter one or both.", vbInformation, _
"Provider Appeals Database (PAD)"
Else
UpdatePW.NewPW cboUser, txtPassword
End If

End Sub


Public Property Get filledCheck()
'set a break point on the line below
filledCheck = (IsNull(cboUser) Or cboUser = "") Or _
(IsNull(txtPassword) Or txtPassword = "") Or _
(IsNull(txtConfirm) Or txtConfirm = "")

End Property

Examine the cboUser.Value (txtPassword , txtConfirm).

mfG
--> stefan <--
 

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

Similar Threads


Top