MS Access Report

snhandle
snhandle used Ask the Experts™
on
I have report in Access where I am using "dlookup" formula(report footer) to get the data from another table. Now I am using parameter for the report. I want "dlookup" formula to use the same criteria that I use in the parameter. It should return only that that i use in the parameter.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hamed NasrRetired IT Professional

Commented:
You mean parameter in query for the report!

Just add the parameter as a field in the query, and will be available as a field in the report based on the query.

PARAMETERS x Short=100;
SELECT a.f1, x AS Expr1
FROM a
ORDER BY a.f1;

For further discussion, upload a sample database demonstrating the problem.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
Since you did not post your existing Dlookup, or post what the new parameters are, or how you are gathering them, or how many there are, ...
 ...it is difficulty to give you an exact solution.

This is why it is always helpful to post a sample database

Author

Commented:
Attach is the database. When I run the Report2, it ask for criteria and I put "Source2" and the report Start Amount give me "Source1" Start Amount from 'Start Amount" Table instead of Source2. The start amount should match what I put in the parameters. thanks
Test-Report2.accdb
Retired IT Professional
Commented:
Modify control source for sa1 to:
=DLookUp("[Beg Amount]","Start amount","Fund_Num='" & [Funding] & "'")

Author

Commented:
What if I use dropbox for the parameters, where I can select the source from drop down menu. Then what would be the dlookup formula. thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial