• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

Currency format in database field

Greetings, almighty experts -

Wondering what the secret is to displaying a number in currency format in a Frontpage 2003 database results field.

TIA!
0
lenwruk
Asked:
lenwruk
  • 9
  • 6
1 Solution
 
lenwrukAuthor Commented:
I ask because I have found some very valuable inisght from some of your suggestions; however, all that I have tried thus far have failed.  Here is my code:

fp_sQry="SELECT *, Format(INVOICE,'$#,000.00') AS Expr1, Format(LIST,'$#,000.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"

The fields INVOICE and LIST still show up as 123456 vice $123,456.00.

Any thoughts?
0
 
hhammashCommented:
Try to select the fields instead of * then continue with the same.
0
 
lenwrukAuthor Commented:
I get a database results wizard error
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
lenwrukAuthor Commented:
Just so you know, this is what was modified:

fp_sQry="SELECT STOCK-NO,YR,MODEL,BODY,COLOR,INT-COLOR,DESC,SERIAL,CYL,INVOICE,LIST,Format(INVOICE,'$#0,000.00') AS Expr1, Format(LIST,'$#0,000.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"
0
 
hhammashCommented:
Did you try this:


fp_sQry="SELECT Name,Address, Format(INVOICE,'$#,##0.00') AS Expr1, Format(LIST,'$#,##0.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"

Name and address fields are just an example here.  Try the new format that I put.
(Invoice,'$#,##0.00')
0
 
lenwrukAuthor Commented:
No.  I will try lower-case...
0
 
lenwrukAuthor Commented:
No, sorry:

fp_sQry="SELECT Stock-no,Yr,Model,Body,Color,Int-color,Desc,Serial,Cyl,Invoice,List,Format(INVOICE,'$#0,000.00') AS Expr1, Format(LIST,'$#0,000.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"
0
 
lenwrukAuthor Commented:
I just realized what you wanted me to actually change:

fp_sQry="SELECT Stock-no,Yr,Model,Body,Color,Int-color,Desc,Serial,Cyl,Invoice,List,Format(INVOICE,'$#,##0.00') AS Expr1, Format(LIST,'$#,##0.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"

Still no dice - damn!
0
 
lenwrukAuthor Commented:
I also tried a combnation of the two, using the formatting you suggested, and * instead of the literal field names...
0
 
hhammashCommented:
So,  you are not getting errors,  you are just getting the numbers without formatting.
0
 
hhammashCommented:

Hi,

Take a look at this link,  it is a different approach which will work 100%

http://outfront.net/spooky/adv_drw_val.htm

hhammash
0
 
lenwrukAuthor Commented:
Thanks, but I guess I am unsure where to insert this could in the example I have, with the intention of formatting the fields INVOICE & LIST:

fp_sQry="SELECT * FROM VW WHERE (MODEL =  '::MODEL::')"

0
 
hhammashCommented:
Keep the sql statement as it is with no formatting.  The change would be in the Red code under the variables.

You know, you have the first Webbot grey line,  under it,  you have the fp_sQry line,  under this line you have a list of variables,  under the variables you have another grey line under which the fp fields red code starts.  Here is the place to change.
0
 
lenwrukAuthor Commented:
Oh my God!  I see what you're talking about!

This is cool - I just made the change, and once I got rid of all the stuoid gray code, it worked like a charm!!!  

Thanks, dude!!!

0
 
hhammashCommented:
You are welcome
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 9
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now