DLookup Syntax Problem

J

jim_9296

I'm trying to use a DLookup to lookup a value on the current form and return
a text string from a table. However, I think I have problems with my
Criteria syntax.

=DLookup("[Unit]", "Items List", "[Descr] = ' " '
Forms!SUBFORMAirport!ItemSelected " ' ")

[Unit] is the field from where I'm trying to draw the text

Items List is the Database with the info

SUBFORMAirport is the form that I'm currently designing

ItemSelected is the name of the Combo Box control on the current form.

[Descr] is the field to which I'm comparing the value of ItemSelected

What am I doing wrong?
 
A

Al Camp

Jim,
When in doubt, use "full" addressing...
=DLookup("[Unit]", "Items List", "[Descr] =
Forms!YourMainFormName!SUBFORMAirport.Form!ItemSelected")
 
Top