MS Access Report

Posted on 2014-08-03
Last Modified: 2014-08-05
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.
Question by:snhandle
    LVL 30

    Expert Comment

    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.
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    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, ... is difficulty to give you an exact solution.

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

    Author Comment

    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
    LVL 30

    Accepted Solution

    Modify control source for sa1 to:
    =DLookUp("[Beg Amount]","Start amount","Fund_Num='" & [Funding] & "'")

    Author Comment

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    Read about achieving the basic levels of HRIS security in the workplace.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now