I am trying to format a number as currency in Access VBA.
In the immediate window, when I enter:
? Format(123, "Currency")
I get the expected response: "$123.00"
However, in the code window, when I enter:
Debug.Print Format(123, "Currency")
I get an error pointing to that line: "Run-time error '13': Type mismatch"
Why does the same simple code work in the immediate window, but throw an error when run from the code window?