Thanks Minty,
This code is used to get a balance for payment and also similar code used to create statements
Unfortunately I have recently taken over this program from someone else and am just trying to work with what I have without doing a compete rewrite
Same issue with naming...