Access Query Question

Results 1 to 3 of 3

Thread: Access Query Question

  1. #1
    Join Date
    Dec 1969

    Default Access Query Question

    can i create a query that will return numbers in currency format?<BR><BR>access database

  2. #2
    Join Date
    Dec 1969

    Default RE: Access Query Question

    Well... you can either change the type of the field in question to currency, or you could use FormatCurrency()

  3. #3
    Join Date
    Dec 1969

    Default One right, one wrong...

    Well, actually it might not be wrong, depending on how you use the query.<BR><BR>Anyway, if you make the query from ASP/ADO/VBS, then using a CURRENCY data type in the DB won&#039;t do any good, because the VBScript code will treat it as just another kind of number, and you&#039;ll have to use FormatCurrency() in the VBS code to display it formatted on the web page.<BR><BR>Of course, if you are talking about using reports in and from Access, then just making the field of type currency is enough.<BR><BR>And while you can use FormatCurrency() within Access, this will give you a STRING value in the ASP/ADO/VBS code. If you don&#039;t intend to do *ANY* numeric manipulations of the data, that&#039;s fine. But it seems to me to be more flexible to just return a number to ASP/ADO/VBS and let VBS do the FormatCurrency() as needed. There&#039;s not going to be any measurable performance difference, as the FormatCurrency() code is running at machine code speed however and wherever it is invoked.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts