0

Hi, this is the first time I have posted a question. I'm really hoping for somebody to help me. I have a text box in a report that I need to populate via a function. The data required (OPENING BALANCE) is already in another query titled: "qryEOD Report Query".

I am using a query (qryEOD Report) to populate the report and I cannot seem to make this text box work - always an error.

This is the function used in the expression builder:

=DLookUp("[qryEOD Report Query].[OPENING BALANCE]","qryEOD Report Query","[qryEOD Report Query].[CP NAME]"="[qryEOD Report].[CP Name]")

Appreciate anyone's help.

Cheers,
JFunk

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by JFunk
0

It's hard to tell without knowing what the structure of your database is, but the problem appears to be with the last argument of the expression.

Try something along these lines:

=DLookUp("[qryEOD Report Query].[OPENING BALANCE]","qryEOD Report Query","[qryEOD Report Query].[CP NAME]=" & [qryEOD Report].[CP Name])

Also, you can try using exclamation marks instead of periods:

=DLookUp("[qryEOD Report Query]![OPENING BALANCE]","qryEOD Report Query","[qryEOD Report Query]![CP NAME]=" & [qryEOD Report]![CP Name])
0

Hi Timothy,
Sorry for the late reply but I did try your suggestions and it still didn't work. I am not sure why. In the end I just created another query which performed the calculations and then used that same query to create my report.

Appreciate your help though.

Cheers,
JFunk

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.