Numeric Values in Concatenated Text Expressions

redpoppy

Registered User.
Local time
Today, 10:52
Joined
Apr 11, 2001
Messages
14
I'm trying to display text and numeric values on a report in a concatenated text field.

The text expression is defined as:
="Deposit amount "&[deposit]
[deposit] is defined as a currency field with 2 decimal places in both the table and form that feed the report.
There are 2 issues with the text expression in the report:
1) Sometimes [deposit] displays to 3 or 4 decimal places eg: £32.1234 when I want only the 2 rounded
2) If [deposit] is, for example, £32.10 it displays in the text expression as £32.1 - missing off the trailing zero

Looking through the help information I thought that the Function statement might be appropriate and I tried changing the text expression to
="Deposit amount "& format([deposit],0.00)
but Access wouldn't accept this statement and changed the 0.00 to 0 for some reason, resulting in [deposit] being rounded up to the nearest whole number.
I'm not at all fluent with VB and am a relative newcomer to Access, being mostly self-taught. I would appreciate some help with possible solutions please.
 
Set the field's data to currency and 2decimal places in the underlying query, then Format([MyField],"Currency")
 
Thanks a lot Rich, that's fixed it.
 

Users who are viewing this thread

Back
Top Bottom