Gustav Brock
Gustav at cactus.dk
Mon Sep 29 08:57:57 CDT 2008
Hi Tina Finish this query to select the records with no aggregating or sorting. Then create a new query where you use the first as the source. In this you can Group By and Sum as you like. /gustav >>> tinanfields at torchlake.com 29-09-2008 15:41 >>> Hi All, I have a table with names and other details of persons and organizations and a table with records of contributions. The requirement is to craft a report showing all the contributors who gave at least some particular amount over some particular time period. The time period and amount are selected by the user from a form. I have a query that selects the pertinent fields from the tblNames and the tblContributions. So, I need to craft another query that selects only those contributions made between the starting and ending dates (found on the form) and that total the particular minimum amount. Using the QBE grid I can easily select all the contribution records from my first query that match the date criteria provided from my form. But, I also want to get totals that match the amount criterion from the form. I tried using the totals row and ran into trouble right away - it doesn't like asterisks at all, insists on my putting each field I want from the first query into the grid - but, then what? The only fields I really want totals of any kind for are the MEMID (Group by), the contribution amount CAMT (Sum), and the date field (Where the criteria are met). All other fields I just want to have appear, but I don't know what selection to make from the totals drop list. I tried Var, but that generated a data type mismatch. So, I am feeling stymied. Any help? Probably as soon as I send this plea for help off to the list, my brain will kick in and I will see what I am not seeing now. Thanks, TNF