Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Error with formatcurrency statement
Hi,
I got the following line in the formatcurrency statement that is giving erro
r.
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Jack
10-22-04 01:55 AM


Re: Error with formatcurrency statement
The quick and dirty fix:

FormatCurrency("0" & TotPersonnel)

Ray at work


"Jack" <Jack@discussions.microsoft.com> wrote in message
news:30E07662-9D58-446F-9426-CEE3E79CC3EE@microsoft.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.



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-22-04 01:55 AM


Re: Error with formatcurrency statement
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<uL5jXg7tEH
A.1204@TK2MSFTNGP10.phx.gbl>...
> The quick and dirty fix:
>
> FormatCurrency("0" & TotPersonnel)
>

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

Report this thread to moderator Post Follow-up to this message
Old Post
Larry Bud
10-22-04 08:55 PM


Re: Error with formatcurrency statement
Yeah, it handles nulls and empties all in one swoop.  :]

Ray at work

"Larry Bud" <larrybud2002@yahoo.com> wrote in message
news:5db363e0.0410220944.2e90dd80@posting.google.com...
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:<uL5jXg7tEHA.1204@TK2MSFTNGP10.phx.gbl>... 
>
> Great idea... can't believe I never thought of it! :-)



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-22-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:39 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.