Others

Fix DLookup Returning #Error in a Microsoft Access Report

Bushra ParveenBushra Parveen Nov 20, 2026 868 views

Question details

Fix a DLookup expression that returns #Error in an Access report when its record source uses joined tables.

Fix DLookup Returning #Error in a Microsoft Access Report
Product
Microsoft Access
Device & OS
not provided
Scenario
A report looks up a financial impact description using a value from its record source.
Observed behavior
The lookup works with a table record source but displays #Error when the report uses a query containing joined tables.
Before you start

Open the report in Design View and identify the text box containing the DLookup expression. Check that the report's Record Source includes the financial impact field and that FinancialImp contains the FinValue and FinString fields.

Solution 1Recommended

Build an explicit numeric DLookup criterion

Use this expression when FinValue and the report's financial impact value are numeric.

1
Open the control properties

In Access, right-click the report in the Navigation Pane, choose Design View, and select the text box displaying #Error. Open its Property Sheet and select the Data tab.

2
Set the lookup expression

In Control Source, enter: =DLookUp("[FinString]","[FinancialImp]","[FinValue] = " & [ttFinancial Impact]). This inserts the current report value into the numeric criteria string.

3
Check the value and field name

Open the report's Record Source query in Datasheet View and verify that [ttFinancial Impact] is present, numeric, and populated for the rows you are testing. If its name is ambiguous, give the query field a unique alias and use that alias in the expression.

4
Test the report

Save the report and switch to Report View or Print Preview. Check several records to confirm that the expected FinString values appear.

Build an explicit numeric DLookup criterion
Null and text values: A Null report value can produce an incomplete criterion. Handle missing values separately. If FinValue is a text field, the criterion must enclose the value in quotes instead of using the numeric expression above.
Free Microsoft Office alternative

Work with exported Access data in WPS Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface. Export Access query results to Excel to work with the data in WPS Spreadsheets; WPS does not run Access reports or fix Access DLookup expressions.

Review and analyze exported Access query data in spreadsheetsCompatible with Microsoft Excel XLSX filesFamiliar spreadsheet interface for an easier transitionFree, lightweight office suite
QA img-9

Frequently Asked Questions

Why does DLookup work with a table but fail with a joined query?

The joined query may expose an ambiguous field name, omit the field the report expects, or return a different value than intended. Open the report's Record Source in Query Design, check the output fields, and give the lookup value a unique alias.

What happens when DLookup finds no matching record?

DLookup returns Null when no record matches the criterion. Check that the report value matches a FinValue in FinancialImp and distinguish a missing match from an invalid expression that displays #Error.

Does the DLookup criterion change for a text field?

Yes. Text values must be enclosed in quotes within the criteria string, unlike the numeric example. Any quote characters in the value must also be escaped so the criterion remains valid.

Where do I enter the expression in an Access report?

Open the report in Design View, select the result text box, and enter the expression in Property Sheet > Data > Control Source. An expression entered there begins with an equals sign.