Multiple Dlookup issue

M

Mike

Hi. Can someone tell me what I am doing wrong in the phrase below? It's
supposed to find the zip code from a table for the previous stop on that
load. I'll properly condition the first stop later. I get a blank field in
the form. This is from the control source in my subform. If I remove the
last part I get the current zip code. Here's the phrase.

=DLookUp("[LocationZIP]","Locations","[LocationID]=" & [Forms]![Loads]![Stop
Order]![LocationID] & " And [StopNumber]=-1+ [Forms]![Loads]![Stop
Order]!StopNumber")

I did -1+... becuase I wasn't sure where to put the quotes around it. Any
help would be welcome.

Mike
 
G

Guest

If I understood:

=DLookUp("[LocationZIP]","Locations","[LocationID]=" & [Forms]![Loads]![Stop
Order]![LocationID] & " And [StopNumber]= " & [Forms]![Loads]![Stop
Order]!StopNumber - 1)
 

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


Top