473,381 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,381 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 9574
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bill Stanard | last post by:
I have had no success using the format function as follows (the two lines of code run one after the other): 'displays a running total of lblAmtdue.Caption 'contents in txtTotal.Text...
3
by: John L | last post by:
Well, another basic type of question...amazing how much I've forgotten - never was a VB guru, but. I can see I'll have to pick up a couple VB5 instruction books - any suggestions on a couple good...
2
by: Willing 2 Learn | last post by:
I'm still having trouble getting my program to do arithmetic in cents(keeping all #'s) then convert the answer in a format of dollars & cents. The main program should add, subtract, scalar...
3
by: news.shaw.net | last post by:
I have a subform that contains a currency field. If I tab my way to the field, everything works as desired, a number can be entered, and when I leave the field it is rendered as a currency...
2
by: Bob Dydd | last post by:
Hi Everbody Question Changing the regional settings ie. from UK to US AUS etc, Access retains the original currency format that the application was created in. So if an mdb that is written...
4
by: Gerry Abbott | last post by:
Hi All. How can i put a zero decimal for my currency into my format statement, == & ", for " & & " days. Cost " & Format(,"Currency") which is the data source for a textbox on a report
7
by: zlf | last post by:
1ˇ˘Here is a number. double nu = 123 2ˇ˘Format it with 3ˇ˘The result is "$123" I want to ask how to deformat "$123" to 123 Thx (Currency symbol is not restricted to '$')
2
by: crferguson | last post by:
Hello all! I'm having the oddest issue trying to format a numeric string as currency without decimals. For instance... strSalary = "120000.56" strSalary = Format(strSalary, "$#,##0") 'this...
2
by: Ian | last post by:
I have an Access 2000 database written in the UK, this database has many fields set to Currency, I now want to move this database over to a user in the USA but my Currency fields still show the UK...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.