Hi
I keep getting the above error message when trying to run actions on my DB
in MS Access. I am using the VBA code editor to create the code and one
example is listed below.
If anyone has any idea what I am doing wrong I would welcome some help
If Me.txtOldPassword.Value = DLookup("Password", "Security", "[lngMyEmpID]="
& Me.combUsername.Value) Then
modlngMyEmpID.lngMyEmpID = Me.combUsername.Value
If Me.txtNewPassword.Value = Me.txtRetypePassword Then
mySQL = "UPDATE Security (Password) VALUES ('" & stNewPassword & "')"
Else
MsgBox "The two New passwords don't match", vbOKOnly, "Mismatch of
Passwords"
End If
Else
MsgBox "The old Password you typed doesnt match the Password for the
Username Selected", vbOKOnly, "Invalid Password"
Me.txtOldPassword.SetFocus
End If
When I debug the error it highlights the first line.
George Nicholson - 21 Mar 2006 20:07 GMT
Your Dlookup asks: "In the table named Security, what is the value of the
Password field in the record where table field lngMyEmpID equals
combUsername?"
My guess is that lngMyEmpID isn't the name of a field in Security, so the
Dlookup fails, resulting in the "cancelled" message.
HTH,

Signature
George Nicholson
Remove 'Junk' from return address.
> Hi
>
[quoted text clipped - 24 lines]
>
> When I debug the error it highlights the first line.