vbscript, ms access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dilruba
    New Member
    • Jun 2007
    • 21

    vbscript, ms access

    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 )

    Code:
    Dim val
    
    val = recordset.fields.item("column_name").value  
    
    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?
  • jagged
    New Member
    • Feb 2008
    • 23

    #2
    Originally posted by Dilruba
    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 )

    Code:
    Dim val
    
    val = recordset.fields.item("column_name").value  
    
    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?

    Code:
    Response.Write FormatNumber(val)
    There are other parameters you can specify to control the formatting...
    Code:
    FormatNumber(Expression[,NumDigAfterDec[, IncLeadingDig[,UseParForNegNum[,GroupDig]]]])

    Comment

    Working...