Share via

Access: Trim function-currency field formatting

Anonymous
2013-08-21T16:45:32+00:00

In Microsoft Access: if using the trim function and you include a currency field also with text the currency field loses it's formatting.  Instead of $1,450 the result is 1450.  How can I keep the formatting.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2013-08-21T17:42:07+00:00

    The Trim function is used on TEXT fields to eliminate leading and trailing spaces. A field formatted as Currency will be a number datatype. (unless you used a format function). In either case, the formatting should remove any leading or trailing zeros. So you should not be using Trim() with a number/currency.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2013-08-21T20:07:53+00:00

    What do you mean by "currency field also with text"?

    I suspect you are using a form/report text box with an expression like:

       ="Amount due: " & currencyfield

    If that is what you are trying to do, try changing the expression to:

       ="Amount due: " & Format(currencyfield, "$#,##0.00"

    Was this answer helpful?

    0 comments No comments