You canceled the previous operation

  • Thread starter Neil via AccessMonster.com
  • Start date
N

Neil via AccessMonster.com

i keep getting this error message when using DLookup

here is my code
If Me.Password.Value = DLookup("[Password]", "Users", " [UserName]= " & Me.
UserName.Value) Then
any sugestions as this getting anoying
thanks Neil
 
A

Allen Browne

The message indicates the the DLookup() could not be calculated because one
of the arguments is invalid.

If UserName is a Text field (not a Number field), you need additional quotes
in the 3rd argument. Try:
DLookup("Password", "Users", "[UserName] = """ & Me.UserName & """)
 
N

Neil via AccessMonster.com

Thanks that was the problem
changed it to this
If Me.Password.Value = DLookup("[Password]", "tblUsers", " [UserName]= '" &
Me.UserName.Value & "'") Then
and it worked a treat

Thanks

Allen said:
The message indicates the the DLookup() could not be calculated because one
of the arguments is invalid.

If UserName is a Text field (not a Number field), you need additional quotes
in the 3rd argument. Try:
DLookup("Password", "Users", "[UserName] = """ & Me.UserName & """)
i keep getting this error message when using DLookup
[quoted text clipped - 4 lines]
any sugestions as this getting anoying
thanks Neil
 

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

Trouble with DLookup 3
Dlookup Errors 3
DLookup questions 3
Record validation before save 1
DLOOKUP question 4
Dlookup Question 3
Dlookup - yet another question 10
Custom Menus in 2007 1

Top