Totals query (Access 2000)

I want to relate two queries that are not connected namely qryMonthlyGain and qryMonthlyOutlays into one query called qryGrossmargin.However the results repeat themselves many times and i do not know how to build this query
Is it possible to do it with a query ?

Re: Totals query (Access 2000)

I am really sorry i cannot solve my problem.Please do apologize me for giving the false data. I have copied now real data and you can see in the form my problem. I will be so grateful if you correct it and send me the improved solution. Would you send back my attachement with the suggested solution ?

Re: Totals query (Access 2000)

This new one still has only 9 records in Order Details, and they all relate to afid 1. They are all in January 2007.

So it still seems to me that if you change the query criteria as I suggested earlier it works OK.
(When I click the right month and customer, data appears in the listbox. Whether it is the right data I don't really know.)

Also in qryGain you have a criteria of true for the field PaymentID. I don't know what that means as PaymentID is a number.

Re: Totals query (Access 2000)

You will do me a favour if you send back my attachement with the correct answer. So far i cannot understand. I have changed the query criteia as you suggested.You cannot click on the right customer.There is not such a control on the form . The customer belongs to afid Nr 1. You must click on the option 1 which is afid 1 and then on the month january.Because all the records are from afid 1 and from january.
So may i ask you to send me back the corrected version ? You obviously are able to solve it, I cannot solve my problem and it very important for me
Thank you in advance for everything

Re: Totals query (Access 2000)

Thank you for the reply. To my regret in your version also the form gives the same errors.If you click on the first option, that is afid 1 and january you get one and the same result 10 times.Maybe the totals query is not right ?