• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1983
  • Last Modified:

#name error on dlookup field in MS Access report

Hi there

I have a DLOOKUP function on a field in a MS Access report that is returning a #NAME? error.  The syntax for the function is:


The "Change" value is calculated as: ([FY1213]-[FY1112])/[FY1112] and is noted as an expressions whereas the FY1112 and FY1213 values are Summed.  So, in the query, you have:

FY112 - Sum
FY1213 - Sum
Change - Expression

Can someone explain to me why this is not working?  I have DSUM functions in the same report and they are working quite well.

  • 2
1 Solution
Try this:

=DLookUp("[Change]","[qry_PYTD_vs_CYTD_Performance_BBLS_Pct]","[ProductLongName]= '" & [txtProductLongName] & "'")

Open in new window

The above is for ProductLongName as a text field.  If it is numeric, try this:

=DLookUp("[Change]","[qry_PYTD_vs_CYTD_Performance_BBLS_Pct]","[ProductLongName]= " & [txtProductLongName] )

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now