Results 1 to 5 of 5
  1. #1
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151

    Joining Unioins output to tables? Help Needed

    I have 2 queries and need the data merged.



    One query I pull the life-to-date data the other I pull last-week-data. I need the output of both queries merged on a report.

    There always will be a match on a key field from the life-to-date-data to the last-week-data (family-number).

    To get the data on the report what would work best? Can you do Joins on the query, or would it best somehow?? to output the query runs to a table then do a simple join on the tables and put the data on the report?

    Thanks for any help in this problem.
    Russ - Rneuman at SCANinc.org

  2. #2
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151
    For both queries I excuted another query to sum and merge up the data. Same set of tables at the root. And, all the last-week-data is in the life-to-date-data.
    Life-Cases - Last-Week-Cases
    101 .......... none
    102 ...........none
    103............103 - Match
    104........... none
    105........... 105 - Match


    The new query output to go to the Report would be look like:
    101 only ytd amts/percent-of-goals
    102 only ytd amts/percent-of-goals
    103 both ytd amts/percent-of-goals and weekly amts/percent-of-goals
    104 only ytd amts/percent-of-goals
    1053 both ytd amts/percent-of-goals and weekly amts/percent-of-goals

  3. #3
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151

    Instead of joins/unions - add new wkly fields

    Probably the best would be to create a subset of weekly total fields within the lifetime query pull of data.

    This is will be little a little hairy for the selection for a weekly-amt that is come from a user-entered parameter.

    For example one field name = "F2F" - (Face-to-Face) activity sum. The formula in query is now:

    F2F: Round(IIf(([ACTIVITY TYPE-SA]<>"Travel") And ([RATE VALUE]="1"),[TIME-SA],"0"),2)

    I would need to create the weekly field like this:

    WKLY-F2F: Round((IIf(([ACTIVITY TYPE-SA]<>"Travel") And ([RATE VALUE]="1"),[TIME-SA],"0"),2) and (DATE-SA Between [Start Date] And [End Date])

    Does this look and sound like a great way to go?

    Thx Russ

  4. #4
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151
    I got the formula here it is:

    WKLYF2F: Round(IIf(([ACTIVITY TYPE-SA]<>"Travel") And ([RATE VALUE]="1") And ([DATE-SA] Between [Start Date] And [End Date]),[TIME-SA],"0"),2

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for letting us see your solution. I love it when people solve their own problems. You get to see people learn.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Insert Query output into a table
    By ammu_sridhar in forum Programming
    Replies: 1
    Last Post: 06-12-2009, 01:09 AM
  2. output of queries like to have rounded numbers
    By techexpressinc in forum Queries
    Replies: 5
    Last Post: 05-28-2009, 07:56 PM
  3. Joining tables two tables and another table that is not
    By DevintheDude in forum Database Design
    Replies: 0
    Last Post: 09-12-2007, 08:56 AM
  4. Output Query to Text
    By denileigh in forum Queries
    Replies: 1
    Last Post: 05-27-2006, 12:34 PM
  5. How to output only current record in query
    By mslieder in forum Access
    Replies: 0
    Last Post: 01-20-2006, 05:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums