Help with DLookup Syntax

R

robboll

Access 2003
If I put in a test value, this works in the Immediate Window:
DLookup("[Template]", "[Templates]", "[TemplateName]= 'Signature'")

If I have a ListBox (i.e., List97) to replace 'Signature' -- what is
the syntax? Here is what I have:

Dlookup("[Template]", "[Templates]", "[TemplateName] =" &
Me!List97.Value)

Returns an error:
Expected: =

Thanks for any suggestions

RBollinger







? Dlookup("[Template]", "[Templates]", "[TemplateName] =" &
'Me!List97.Value')
? DLookup("[Template]", "[Templates]", "[TemplateName]= 'Signature'")
 
A

Al Camp

Assuming MultiSelect = None...
Try...
Dlookup("[Template]", "[Templates]", "[TemplateName] =" & List97)
I tested... should do it.

Suggestion: use object names that make sense to you... ex... lstSignature.
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 

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