472,119 Members | 990 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Currency Format Blues

This should not be an issue, but it is. I'm sure that someone knows
what little piece of code is needed too persuade Access 97 to include
a currency format for labels (Avery, mailing type). Have had no
problems with currency formatting on reports - just the labels.
Doesn't matter if the associated field in the Table and Form have
Format as Currency, because on the labels (for instance $50.00) prints
as: 50 The only way to get it to print correctly is to changed the
field to Text on the Form and manually type in $50.00.

I assume that whatever code is needed belongs in the Detail Section of
the label/report Design View screen, on the line OnFormat. The field
name on the label is "lblAmount" and on the Form is "ItemCost."

Thanks, Dalan
Nov 12 '05 #1
2 9376
After running the label wizard, you can open the report in design view, and
set the Format property of the text box that contains the Amount. Setting
this property to Currency should yield the right results.

If the amount is actually part of a longer expression, you can use the
Format() function to display it as currency. For example, the Control Source
of the text box might be:
="You paid " & Format([Amount], "Currency")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
This should not be an issue, but it is. I'm sure that someone knows
what little piece of code is needed too persuade Access 97 to include
a currency format for labels (Avery, mailing type). Have had no
problems with currency formatting on reports - just the labels.
Doesn't matter if the associated field in the Table and Form have
Format as Currency, because on the labels (for instance $50.00) prints
as: 50 The only way to get it to print correctly is to changed the
field to Text on the Form and manually type in $50.00.

I assume that whatever code is needed belongs in the Detail Section of
the label/report Design View screen, on the line OnFormat. The field
name on the label is "lblAmount" and on the Form is "ItemCost."

Thanks, Dalan

Nov 12 '05 #2
"Fredg" <fg******@att.net> wrote in message news:<Ox**********************@bgtnsc04-news.ops.worldnet.att.net>...
OK Dalan, you've finally given the information needed to clear this up.
I think!!

I can't go back to the original thread (all gone), but I believe I gave you
=Format([FieldName],"$ #,###.00") as a control source.

Here is your difficulty in getting this to work.
I assume that whatever code is needed belongs in the Detail Section of
the label/report Design View screen, on the line OnFormat. <<


NO!
There is no code.
All you need do is place
=Format([FieldName],"$ #,###.00")
exactly as written, on the CONTROL's CONTROL SOURCE property line.
(Change [FieldName] for your actual field name, of course.)

Make sure the name of this control is not the same as the name
of the field used in the control source expression.

Regarding: > The field
name on the label is "lblAmount" and on the Form is "ItemCost."<


What is the name of the FIELD that contains the data,
(not the name of the label control)?
If the field name is [ItemCost], then make sure the label
control name is not 'ItemCost'.
The Label name is found on the control's Property Sheet's Other tab.
The Control Source is found on the control's Property Sheet's Data tab.
So if I assume [ItemCost] is the name of the field that contains the data,
then your control source should be:
=Format([ItemCost],"$ #,###.00")
The name of the label control can not be 'ItemCost'.
The result will be $ 56.00.

Note: You can also use
=Format([ItemCost],"Currency")
however that puts the $ sign right up against the first digit
i.e. $56.00.
Use which ever you like best.

I hope you've got it now.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
This should not be an issue, but it is. I'm sure that someone knows
what little piece of code is needed too persuade Access 97 to include
a currency format for labels (Avery, mailing type). Have had no
problems with currency formatting on reports - just the labels.
Doesn't matter if the associated field in the Table and Form have
Format as Currency, because on the labels (for instance $50.00) prints
as: 50 The only way to get it to print correctly is to changed the
field to Text on the Form and manually type in $50.00.

I assume that whatever code is needed belongs in the Detail Section of
the label/report Design View screen, on the line OnFormat. The field
name on the label is "lblAmount" and on the Form is "ItemCost."

Thanks, Dalan


Thanks Fred, =Format([ItemCost],"Currency"), worked just fine.
Displacing the "Trim" in the label field is what was needed.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bill Stanard | last post: by
3 posts views Thread by John L | last post: by
2 posts views Thread by Willing 2 Learn | last post: by
3 posts views Thread by news.shaw.net | last post: by
2 posts views Thread by Bob Dydd | last post: by
4 posts views Thread by Gerry Abbott | last post: by
2 posts views Thread by crferguson | last post: by
2 posts views Thread by Ian | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.