Hi!
I am getting the following error "you canceled the previous operation" when running the dlookup function. I tried to simplify the code...and always getting the message. Please HELP!



I put a button in a form. Once clicking the button a message appears with a value retrieved from a table.

i wrote the following code in the button event click:

Dim x As Variant

x = DLookup("[password]", "salesman", "[salcode]= A001")
MsgBox (x)

Where password is what i want to display from the table salesman having the code a001.

Thank you so much for your help.