Currency formatting lost in concatenated text string

G

Guest

I have table with a currency field that maintains its format in a query. In
a text box on a report (based on the query), I tried to concatenate the
currency field with other text but when combined the currency formatting was
ignored and rounded $100.00 to $100 or worse $100.50 to 100.5. It did not
work either as a concatenated field in a query. Our receipt needs to read,
"Thank you for your recent gift of " & [Gift_Amt] & ". Your gift will be
applied to the following program(s):" Any ideas for a workaround?
 
D

Douglas J. Steele

"Thank you for your recent gift of " & Format([Gift_Amt], "Currency") & ".
Your gift will be applied to the following program(s):"
 
G

Guest

I must be missing something because I tried that before I and received the
error, "The expression you entered contains invalid syntax, or you need to
enclose your text data in quotes." Should this work for Access 97?

Douglas J. Steele said:
"Thank you for your recent gift of " & Format([Gift_Amt], "Currency") & ".
Your gift will be applied to the following program(s):"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



JmsJo1 said:
I have table with a currency field that maintains its format in a query. In
a text box on a report (based on the query), I tried to concatenate the
currency field with other text but when combined the currency formatting was
ignored and rounded $100.00 to $100 or worse $100.50 to 100.5. It did not
work either as a concatenated field in a query. Our receipt needs to read,
"Thank you for your recent gift of " & [Gift_Amt] & ". Your gift will be
applied to the following program(s):" Any ideas for a workaround?
 
D

Douglas J. Steele

Yes, that should work for Access 97.

Did you handle the fact that the posted suggestion had word-wrap in it?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



JmsJo1 said:
I must be missing something because I tried that before I and received the
error, "The expression you entered contains invalid syntax, or you need to
enclose your text data in quotes." Should this work for Access 97?

Douglas J. Steele said:
"Thank you for your recent gift of " & Format([Gift_Amt], "Currency") & ".
Your gift will be applied to the following program(s):"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



JmsJo1 said:
I have table with a currency field that maintains its format in a
query.
In
a text box on a report (based on the query), I tried to concatenate the
currency field with other text but when combined the currency
formatting
was
ignored and rounded $100.00 to $100 or worse $100.50 to 100.5. It did not
work either as a concatenated field in a query. Our receipt needs to read,
"Thank you for your recent gift of " & [Gift_Amt] & ". Your gift will be
applied to the following program(s):" Any ideas for a workaround?
 
G

Guest

Yes, I took into account the word-wrap. There is another underlying problem
here though so to prove it was not me, I created a new database, table, query
and report and tested your fix and it worked. Then I went back to the
original database, created a new table, query and report, tested your fix and
it failed. So I went back to my newly created database, imported all the
modules, tested your fix and it worked. I did not write the original
database so I can't explain why the problem occured but it works now. Thanks
for your help.

Douglas J. Steele said:
Yes, that should work for Access 97.

Did you handle the fact that the posted suggestion had word-wrap in it?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



JmsJo1 said:
I must be missing something because I tried that before I and received the
error, "The expression you entered contains invalid syntax, or you need to
enclose your text data in quotes." Should this work for Access 97?

Douglas J. Steele said:
"Thank you for your recent gift of " & Format([Gift_Amt], "Currency") & ".
Your gift will be applied to the following program(s):"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I have table with a currency field that maintains its format in a query.
In
a text box on a report (based on the query), I tried to concatenate the
currency field with other text but when combined the currency formatting
was
ignored and rounded $100.00 to $100 or worse $100.50 to 100.5. It did not
work either as a concatenated field in a query. Our receipt needs to
read,
"Thank you for your recent gift of " & [Gift_Amt] & ". Your gift will be
applied to the following program(s):" Any ideas for a workaround?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top