| Author |
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.
| |
| Ray Costanzo [MVP] 2004-10-21, 8:55 pm |
| 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.
| |
| Larry Bud 2004-10-22, 3:55 pm |
| "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<uL5jXg7tEHA.1204@TK2MSFTNGP10.phx.gbl>...
> The quick and dirty fix:
>
> FormatCurrency("0" & TotPersonnel)
>
Great idea... can't believe I never thought of it! :-)
| |
| Ray Costanzo [MVP] 2004-10-22, 3:55 pm |
| 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! :-)
|
|
|
|