473,378 Members | 1,138 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,378 software developers and data experts.

Error with formatcurrency statement

Hi,
I got the following line in the formatcurrency statement that is giving error.
Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(TotPersonnel) & "</TD>" & vbCRLF

The error message is:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'formatcurrency'
/gwisprod/FSR_EditDetailPrint.asp, line 345

I found out that if TotPersonnel field contains null value, the above error
gets generated. Any help is appreciated here. Thanks.
Jul 21 '05 #1
3 5088
The quick and dirty fix:

FormatCurrency("0" & TotPersonnel)

Ray at work
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
Hi,
I got the following line in the formatcurrency statement that is giving
error.
Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(TotPersonnel) & "</TD>" & vbCRLF

The error message is:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'formatcurrency'
/gwisprod/FSR_EditDetailPrint.asp, line 345

I found out that if TotPersonnel field contains null value, the above
error
gets generated. Any help is appreciated here. Thanks.

Jul 21 '05 #2
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<uL**************@TK2MSFTNGP10.phx.gbl>...
The quick and dirty fix:

FormatCurrency("0" & TotPersonnel)


Great idea... can't believe I never thought of it! :-)
Jul 21 '05 #3
Yeah, it handles nulls and empties all in one swoop. :]

Ray at work

"Larry Bud" <la**********@yahoo.com> wrote in message
news:5d**************************@posting.google.c om...
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:<uL**************@TK2MSFTNGP10.phx.gbl>...
The quick and dirty fix:

FormatCurrency("0" & TotPersonnel)


Great idea... can't believe I never thought of it! :-)

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: eddie wang | last post by:
formatcurrency function puts ( ) for negative numbers(e.g. (111) ). How can I display the negative numbers with a minus sign infront like -111. Thanks. *** Sent via Developersdex...
1
by: Abby Lee | last post by:
My page runs fine...I just get the yeld sign with a "!" in it. Ok, I asked this question in the VBscript group and they tell me it's a JavaScript issue even though I don't get the error until I...
3
by: jrefactors | last post by:
I want to ask what are the possiblities to truncate data from 1 million dollars to 1 dollar by using formatCurrency and CCur functions? The ASP page has code <%= formatCurrency(rs(14)) %>, the...
5
by: Mark | last post by:
I have a field that has been formatted using the vb.net FormatCurrency method. Now, I need to get the amount back into a regular field so I can use it for calculations. Is there an easy way to...
2
by: isaac2004 | last post by:
hi i am creating a basic asp site that uses cookies to manage a cart for an online store. whenever i open this page without adding anything to the cart. i get an error message. here is my code ...
5
by: ljb | last post by:
Does anyone know how to correct or why formatcurrency() places the dollar sign after the number? thanks LJB
4
by: c676228 | last post by:
Hi everyone, I got an error from my asp page. The interesting thing is it only occurs when I choose to give me report for August, if I select any other month, everything looks fine. I have no clue...
5
by: Patrick A | last post by:
All, I'm dealing with a 3rd party application that can't interpret the Access function FormatCurrency. When it encounters my query with "Exclu: FormatCurrency(, 0)", it arfs. The vendor says...
3
by: =?Utf-8?B?SnVzdGluIERvaA==?= | last post by:
I am constantly getting the 'Script timed out' error, and would like to see if there is any way I could modify the ASP page. I think I did all I could to improved the performance at the database...
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.