Combining Table Data and Totaled Query Data (1 Viewer)

jtidfold

Registered User.
Local time
Today, 03:31
Joined
Mar 12, 2018
Messages
11
Ok, so I have a simple query that is taking the criteria of two fields (WBS Element and Account) and totaling in a third field (Amount in local currency).

I need to create a new query that takes the summarized totals from that simple query along with some other fields from the table data that were not part of the query described above. Do I need to link a field between the table data and the simple query in this new query or can I just add what I need to add?

Just want to be sure I get this right - I will repeat that I'm coming back to MS Access after 19 years away so I'm basically a newbie again. Please be kind :cool:
 

plog

Banishment Pending
Local time
Today, 03:31
Joined
May 11, 2011
Messages
11,646
Can you demonstrate your issue with data? Provide 2 sets:

A. Starting sample data from table(s). Include table and field names and enough data to cover all cases.

B. Expected results of A. Show what data you hope your query produces when you feed it the data from A.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:31
Joined
May 7, 2009
Messages
19,241
You already have the right idea in there
 

jtidfold

Registered User.
Local time
Today, 03:31
Joined
Mar 12, 2018
Messages
11
Table 1: WBS Element, Job Description, Account, Job Type, Job Type Description, Amount in local currency
Query 1: WBS Element, Account, Amount in local currency (Grouped and Summed on Amount in local currency:
Query 2: All fields from Table 1 but with the Summed items only to reduce the number of lines from the Table for an easier analysis file to output
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:31
Joined
May 7, 2009
Messages
19,241
Create query2 by selecting table1 and query1. Drag the the wbs from tabke1 to query1 to make a link. Do the same to account field.

Select the field you want to outout from table1, include the total amount from query1.

Thats it. Run query2.
 

jtidfold

Registered User.
Local time
Today, 03:31
Joined
Mar 12, 2018
Messages
11
So....I found something even easier actually. Again, newbie here.

In Query1 I put the table fields that I wanted as part of the output AFTER the three calculation fields (after the expression field).

That's it.

And it worked.

I have all the data I need. No linking necessary. I've already checked and the results tie out to the excel file (since I'm just beginning here I still need to make sure the totals tie). I think I was making this too complicate in my mind.

If anyone sees any flaws in doing it this way please let me know, but like I said, it appears to have given me the desired output file.
 

Users who are viewing this thread

Top Bottom