philhowell
Board Regular
- Joined
- Jun 11, 2002
- Messages
- 175
i'm running a simple form in access that updates a form text box with the users password when the users name is seleceted in a combo-box, but it throws up an error saying.........
run-time error 2465
i'm quite new to this so feel feel to give me any pointers
Thanks
Phil
*******************************
Below is the VBA code
Private Sub User_Change()
' define variables
Dim varX As Variant
Dim frmNewPWD
Dim frmUser
Dim frmOldPWD
frmUser = Form.ChangeLotusPWD.User.Value
varX = DLookup("[PWD]", "5_LotusPwds", "[UserName]= '" & frmUser & "'")
If IsNull(varX) Then
varX = " "
Else
End If
' update users password so it display the relevant one based on the user name selected
Forms.ChangeLotusPWD.OLDPWD.Value = varX
' ensure that the New password text box on the form is empty
Forms.ChangeLotusPWD.NEW_PWD.Value = " "
End Sub
run-time error 2465
i'm quite new to this so feel feel to give me any pointers
Thanks
Phil
*******************************
Below is the VBA code
Private Sub User_Change()
' define variables
Dim varX As Variant
Dim frmNewPWD
Dim frmUser
Dim frmOldPWD
frmUser = Form.ChangeLotusPWD.User.Value
varX = DLookup("[PWD]", "5_LotusPwds", "[UserName]= '" & frmUser & "'")
If IsNull(varX) Then
varX = " "
Else
End If
' update users password so it display the relevant one based on the user name selected
Forms.ChangeLotusPWD.OLDPWD.Value = varX
' ensure that the New password text box on the form is empty
Forms.ChangeLotusPWD.NEW_PWD.Value = " "
End Sub