Hi ,

I have a form conatining a subdirectory with records (invoice)

eg


code qty description price total

1000 1 product 1 150 150
2000 2 product 2 100 200


and on the main form i have an som function , and everything works ok but now i need to work wit different VAT percentages. 0, 6, 21 and 21 for special products, so i need to replace this som with a som of all products with vat 0 som of all products with VAT 6% ......

so i need something like that =

=for btw= 0 som([totprice])
=for btw= 6 som([totprice])
=for btw= 21 som([totprice])
=for btw= 21 som([totprice])


i can add an extra column in the subform with the VAT code.

Anyone an idea ?