Hi Folks,
First of all i apologise for posting double, but i m compelled. I badly need help. i m not an expert like you guys. I hope someone will surely come to my rescue.
I have a problem with summing values in a query that is based on 5 tables.
In my form i have a text box which shows the total quantity on hand. The formula comes from all 5 table fields. for example:
GOODS RECEIVED GOODS SENT REPAIR RECEIVED REPAIR SENT ISSUES
Trx_Qty Trx_Qty1 Recd_Qty Sent_qty Issued_Qty
The formula works this way:
Expr1: [trx_qty]+[recd_qty]-[Trx_Qty1]-[Sent_qty]-[Issued_Qty]
When the records are limited to one row only then all works as desired, but as soon as i add more records in REPAIR RECEIVED Table and REPAIR SENT Table i get multiple rows in the form. Also the sum is not correct. For example:
GOODS RECEIVED GOODS SENT REPAIR RECEIVED REPAIR SENT ISSUES
Trx_Qty Trx_Qty1 Recd_Qty Sent_qty Issued_Qty
40 10 5 10 20
In the above example the formula gives following result
Expr1: 40 + 5 – 10 – 10 – 20 = 5
Expr1 = 5 (This is quantity on hand)
Bu now when I add more rows to other tables I get multiple rows and incorrect sum. Example
GOODS RECEIVED GOODS SENT REPAIR RECEIVED REPAIR SENT ISSUES
Trx_Qty Trx_Qty1 Recd_Qty Sent_qty Issued_Qty
40 10 5 10 20
5
I m attaching the database for you to have a look at it and come up with the solution.
Please help me I m badly stuck
I tried using group by and sum functions but no use
[Sumoftrx_qty]+[recd_qty]-[Trx_Qty2]-[Sent_qty]-[Issued_Qty]
Please Help me out of this mess. It will be highly appreciated
i will b gr8ful
Thanx once again for investing ur time in reading
Note: Expr1 formula may be different in database as quoted here on this forum due to trial and run.
Regards
Darno
First of all i apologise for posting double, but i m compelled. I badly need help. i m not an expert like you guys. I hope someone will surely come to my rescue.
I have a problem with summing values in a query that is based on 5 tables.
In my form i have a text box which shows the total quantity on hand. The formula comes from all 5 table fields. for example:
GOODS RECEIVED GOODS SENT REPAIR RECEIVED REPAIR SENT ISSUES
Trx_Qty Trx_Qty1 Recd_Qty Sent_qty Issued_Qty
The formula works this way:
Expr1: [trx_qty]+[recd_qty]-[Trx_Qty1]-[Sent_qty]-[Issued_Qty]
When the records are limited to one row only then all works as desired, but as soon as i add more records in REPAIR RECEIVED Table and REPAIR SENT Table i get multiple rows in the form. Also the sum is not correct. For example:
GOODS RECEIVED GOODS SENT REPAIR RECEIVED REPAIR SENT ISSUES
Trx_Qty Trx_Qty1 Recd_Qty Sent_qty Issued_Qty
40 10 5 10 20
In the above example the formula gives following result
Expr1: 40 + 5 – 10 – 10 – 20 = 5
Expr1 = 5 (This is quantity on hand)
Bu now when I add more rows to other tables I get multiple rows and incorrect sum. Example
GOODS RECEIVED GOODS SENT REPAIR RECEIVED REPAIR SENT ISSUES
Trx_Qty Trx_Qty1 Recd_Qty Sent_qty Issued_Qty
40 10 5 10 20
5
I m attaching the database for you to have a look at it and come up with the solution.
Please help me I m badly stuck
I tried using group by and sum functions but no use
[Sumoftrx_qty]+[recd_qty]-[Trx_Qty2]-[Sent_qty]-[Issued_Qty]
Please Help me out of this mess. It will be highly appreciated
i will b gr8ful
Thanx once again for investing ur time in reading
Note: Expr1 formula may be different in database as quoted here on this forum due to trial and run.
Regards
Darno