469,644 Members | 1,978 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

vbscript, ms access

21
Number format :
for example,
10,500.00 ( Data type value format of standard for Ms access)
10500 ( Data type value format of general for Ms Access )

Expand|Select|Wrap|Line Numbers
  1. Dim val
  2.  
  3. val = recordset.fields.item("column_name").value  
  4.  
  5. response.write val 
In general Ms Access format, webpage is showing the expected value i.e. 10500.

But for standart Ms Access format, webpage showing the value of 10500, Instead of showing the value of 10,500.00.

If i want to show the value of standard format in webpage, then what should i do?
Feb 23 '08 #1
1 1329
jagged
23
Number format :
for example,
10,500.00 ( Data type value format of standard for Ms access)
10500 ( Data type value format of general for Ms Access )

Expand|Select|Wrap|Line Numbers
  1. Dim val
  2.  
  3. val = recordset.fields.item("column_name").value  
  4.  
  5. response.write val 
In general Ms Access format, webpage is showing the expected value i.e. 10500.

But for standart Ms Access format, webpage showing the value of 10500, Instead of showing the value of 10,500.00.

If i want to show the value of standard format in webpage, then what should i do?

Expand|Select|Wrap|Line Numbers
  1. Response.Write FormatNumber(val)
There are other parameters you can specify to control the formatting...
Expand|Select|Wrap|Line Numbers
  1. FormatNumber(Expression[,NumDigAfterDec[, IncLeadingDig[,UseParForNegNum[,GroupDig]]]])
Feb 23 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Zalek Bloom | last post: by
3 posts views Thread by Mark | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.