All good. I used the ret statement as suggested, and after passing some Nz's and other parameters to cover Null values in various fields, I got it to run as a Public Function I can now call from anywhere.
This might not be THE best way to code this but I understand what is going on and I can...