Getting Error using Dlookup

V

Van T. Dinh

You need to delimit the Test value "jefsav".

Try:

=DLookUp("Name", "employees", "[Login] = 'jefsav'")

HTH
Van T. Dinh
MVP (Access)
 
V

Van T. Dinh

=DLookUp("Name", "employees", "[Login] = '" & _
loginname & "'")

HTH
Van T. Dinh
MVP (Access)
 
J

Jeff

Ahh thank you very much!!!! That did it. I just had the
syntax a bit fubar'd. I will make a note of this for
next time. I should have know it was something simple
like this.

Regards,
Jeff
-----Original Message-----
=DLookUp("Name", "employees", "[Login] = '" & _
loginname & "'")

HTH
Van T. Dinh
MVP (Access)



-----Original Message-----
Ah coolies that worked. Now how about if I want to
replace "jefsav" with a variable that I have defined as a
string? I tried this:

=DLookUp("Name", "employees", "[Login] = " & loginname)

This only returns a NULL

and also

=DLookUp("Name", "employees", "[Login] = " & 'loginname')

This gives me the same canceled opperation error as
before.

Thanks for all the help!!!
Jeff

.
 

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

Top