Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create an expression (Access 2002)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create an expression (Access 2002)

    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.
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create an expression (Access 2002)

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •