Try to isolate the problem. Hit Ctrl-G to see the debug window, immediate pane. Then type:
?formatcurrency(5)
and hit the enter key. If you get an error message, Access is not seeing the function 'FormatCurrency'. In that case, you need to check your references from a module window, Tools menu - References. Look to see if any are marked missing and if so, clear the check box for the missing ones and try again.
If you get a currency formatted value, the problem is likely on the other side of your equal sign. It is good practice to reference controls by preceding them with a reference to the form on which they are contained. It looks like the control is on the current form so in the code window where this procedure is located, type
Me.
When you hit the period, you should see a list of control names found on the current form. Typing lblext...
will fetch the control names beginning with those characters. When the correct one is listed, hit the tab key and it will AutoComplete (if this feature is enabled from the menu Tools-Options... Provided you check that the control with this name is actually a label, this will guarantee the correctness of that side of the equal sign. If the control is not a label (or another control with a caption property, you will get the same error message. If the control is on a different form, that form has to be open and you need to have the name of the form 'dot' name of control.
One more point. If curExtendedPrice happens to be of variant type and contains a null or a string, the code will raise a different error.
Ciao
Jürgen Welz
Edmonton AB Canada
[email protected]