Define a relationship linking Table 2::id to Table 3::Item_id_fk.
In table 2, Sum (table 3::quantity ) will show the total quantity distributed.
And in the same table, quantity - sum ( Table 3::quantity ) will compute the total remaining--the Qty on Hand.
@PhilModJunk thanks for ur reply
but i would like to know the quantity distributed for each item
for ex: in my layout1
item_id item_name quantity_in quantity_distributed quantity_available
101 item1 50 3 47
102 item2 35 3 32
103 item3 90 4 86
Which is exactly what I had in mind with that solution. You get a different total for each item as each record in Table 2 only matches to items in Table 3 with the same ID and the sum function will only total up those records with the same ID.
@PhilModJunk thank u , thanks a lot