Hi Guys,
I am working with billing database. I have tblSale as main table and tblSaleDetail as child table. I have frmSale as main form and frmSaleDetail as sub-form. I have created a query which is pulling information from both the tables and grouping it based on Tax Rate. tblSale has a field called freight , Roundoff. Now if the subform has two types of tax rates two entries are created for the same bill Number. Invoice Total (invTot) in query is calculated field, whose value is not stored any where in any table. Till here everything woks fine. Results are sorted on Bill Number.
Now the issue is I want to add the value of Freight and Roundoff to the result of the query but it keeps getting added twice, if there are two different types of Tax Rates in the same bill. I was wondering if there is a way to check the bill number of previous record with the current record & if the bill number are same then nothing is added to the InvTot (Invoice Total) for the current record AND if they are different then Freight, roundoff is added to the field.
Hope have been able to explain my problem.
Thanks & Regards
Deepak Gupta