• Create an expression (Access 2002)

    Author
    Topic
    #361773

    How do I create this expression? In a query I have two tables Client and Services. Using the following fields client.Program and services.LengthofService and services.DateofServices. I want to build an expression where it would sum LenghtofService for Program = ADAMHS. I want to build the same expression twice more but where Program would equal HUD and Both. If that is possible. Or do I need to do separate queries for all three programs? I just haven’t had that lightbulb experience yet on making the expression builder work. Thanks for all the help.

    Viewing 0 reply threads
    Author
    Replies
    • #547877

      You haven’t given us quite enough information to work with. How are the two tables joined, that is, what field do they share? I assume it is Program, but you need to make it clear.

      Are you working in the query grid? I don’t have Access 2002 on my machine yet, but I was under the impression that the query grid still existed, so I’m a little confused by your reference to the expression builder.

      It sounds like what you need is a Totals or GroupBy query, grouping on the Program field and summing LengthofService. What exactly does Dateof Services have to do with the results you’re looking for? You mention it in your post, but you don’t appear to be using it for anything.

      • #547913

        I figured a better way of doing that particular job. I used an unbound text box in the details section. Then did a control source where I divided the results in the detail section by the control in grand total sum. I appears to be doing the job correctly.

        Thanks for trying to help. Fay

    Viewing 0 reply threads
    Reply To: Create an expression (Access 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: