a, You forgot to change the all the references in the new module when you changed MyPrice etc,
b, You gave the module the same Name as the function,
c, you also had a copy of the function but with a different name.
having sorted that you now have a problem with the joins in the Commission query, I've created a copy with most of the tables removed which enables the function to work as is. I've set the function to output as currency which I assume will default to Rand on your pc anyway, removing the need to Format the query field.
Hopefully you can sort out the join problem and move on to the next part of the jigsaw, my advice is to use a combination of select case statements or If Then Else in the module, instead of multiple Iif's within the query.
HTH