hi all ive used this site b4 with some success so im hoping i can get some advise with a small issue im having.
the problem seems to not work on my pc only but does work on slower systems like the ones at work , very strange!!
so basically ive got a subform with some loan repayment payments in. things like date. amount paid etc. and at the the bottom of the subform is a sum field that totals the payments , easy! i hear u say. The sum field refreshes automatically when new payments are added. Great i thought
here the issue.. im using vba to calculate [new balance] by using something like [total due] - [total paid] (the sum value discussed above) however my VBA returns the sum total as £0.00 therefore the loan balance never decreases. It did work on other machines that are slower but it almost like my pc proccess the VBA code b4 access automatically updates the sum field in the sub form :-( Any thoughts advise or suggestions please.
and no its no wind up lol >< . i'd be interested in using a sum method and a qry. Just to provide a total of the payments for the current laon but i dont know how to get vba to sum a column in a qry as this might work better long run ?
heres the code im using in vba after a new payment is added which works on slower pcs
Forms("frmactiveloan").Balance = Forms("frmactiveloan").totaltopay - [Forms]![frmactiveloan]![subfrmPayments(foractiveloanfrm)].[Form]![totalin]
where total to pay is the initial loan amount and totalin is the name of the sum field on the subform . see photo
i hope somebody can follow what I mean , questions welcome
ps i did try posting to vba variables but still shows as £0.00 just like the vba runs before access totals the subreport data
the problem seems to not work on my pc only but does work on slower systems like the ones at work , very strange!!
so basically ive got a subform with some loan repayment payments in. things like date. amount paid etc. and at the the bottom of the subform is a sum field that totals the payments , easy! i hear u say. The sum field refreshes automatically when new payments are added. Great i thought
here the issue.. im using vba to calculate [new balance] by using something like [total due] - [total paid] (the sum value discussed above) however my VBA returns the sum total as £0.00 therefore the loan balance never decreases. It did work on other machines that are slower but it almost like my pc proccess the VBA code b4 access automatically updates the sum field in the sub form :-( Any thoughts advise or suggestions please.
and no its no wind up lol >< . i'd be interested in using a sum method and a qry. Just to provide a total of the payments for the current laon but i dont know how to get vba to sum a column in a qry as this might work better long run ?
heres the code im using in vba after a new payment is added which works on slower pcs
Forms("frmactiveloan").Balance = Forms("frmactiveloan").totaltopay - [Forms]![frmactiveloan]![subfrmPayments(foractiveloanfrm)].[Form]![totalin]
where total to pay is the initial loan amount and totalin is the name of the sum field on the subform . see photo
i hope somebody can follow what I mean , questions welcome
ps i did try posting to vba variables but still shows as £0.00 just like the vba runs before access totals the subreport data