Hi Guys,
Probably this is very foolish question to ask. I am trying to make a billing database. I have main table tblSale and connected table tblSaleDetails. In tblSaleDetails I have qty, Price, Amount, TaxRate, & TaxAmt as fields. I have also made a query in which Amount is calculated for all the fields of tblSaleDetails.
FIRST PART:
Now I was wondering how can I run the query automatically as soon as qty & Price is updated in FORM. Also query needs to run just for that particular record. Lastly I want to save the result in Amount field. I know We should not save calculated values, but still I would like to do it. Also Should I do it with query or Expression builder? ( With Expression builder I am able to do it, how to do it with Query?)
SECOND PART:
I have made query QryCGST in which I am using tables tblSale , tblSaleDetails , tblBuyer. I am calculating Tax Amount based on ([qty]*[Price]) * Tax Rate /100 , with an iff statement in which checking buyer code whether Tax Rate Applies to him or not. I am able to get the desired results for the whole table. Now I want to perform this query on current record once the Amount field has been updated in the FIRST PART & save the result in CGST field.
Thanks for your help and guidance.
Regards
Deepak Gupta