Attached is "sort" of my db. What I want to do is for Table ARTIKLI to subtract total amount of values in field KOMADA in table INVOICE GLAVA, that coresponds to Sifra_artikli and Red_Br_ in Table Artikli.
Since it is confusing I can put it this way too.
If there is a number "1" entered in field: Sifra Artikli (in Invoice glava TABLE), I want amount in field KOMADA to be subtracted from field Stanje on Red_Br_ with value 1.
You will notice I tried to at least summarize using filter with DBSUM command and later subtract easily but I just can`t do it.
Thanks in advance if you help or try to...