469,167 Members | 1,196 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Formatting currency output...

Well, another basic type of question...amazing how much I've forgotten -
never was a VB guru, but. I can see I'll have to pick up a couple VB5
instruction books - any suggestions on a couple good (basic level) learning
VB books?

Okay - in my database I have a sales total box (textsalestotal) and want to
multiply whatever that figure is by .07617 which is Missouri tax - if I just
use a click event to multiply, for example $30.34 * .07617 I of course get
some number like 2.31099789xxxxx.

For the life of me (been looking over 2 hours) I can't find the format
command to output the answer to a proper currency figure like: Format
(txtsalestotal, "xx.xx") ??

Thanks for any help... :))

John

Jul 17 '05 #1
3 10859
Debug.Print Format$(2.31099789, "$#0.00")

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"John L @yahoo.com>" <john_stlmo<removethis> wrote in message
news:wv*******************@fe04.lga...
Well, another basic type of question...amazing how much I've forgotten -
never was a VB guru, but. I can see I'll have to pick up a couple VB5
instruction books - any suggestions on a couple good (basic level) learning VB books?

Okay - in my database I have a sales total box (textsalestotal) and want to multiply whatever that figure is by .07617 which is Missouri tax - if I just use a click event to multiply, for example $30.34 * .07617 I of course get
some number like 2.31099789xxxxx.

For the life of me (been looking over 2 hours) I can't find the format
command to output the answer to a proper currency figure like: Format
(txtsalestotal, "xx.xx") ??

Thanks for any help... :))

John

Jul 17 '05 #2
No, it needs to be able to automatically convert any number to currency
format - I won't be inputting the number manually and the amount will vary
constantly. I have the data field set to currency - I'm surprised it
doesn't do it automatically anyway...?

Tried that code without success...

Any other thoughts? I used to do this routinely with just a very simply
format expression or truncate process or something -- which I've now forgot
and can't seem to find anywhere.

All I want to do is convert any number within a certain field to currency
format of xx.xx

Thanks for the attempt though - it's appreciated...

John

"Veign" <me@home.com> wrote in message
news:BS***************@newsread2.news.atl.earthlin k.net...
Debug.Print Format$(2.31099789, "$#0.00")

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"John L @yahoo.com>" <john_stlmo<removethis> wrote in message
news:wv*******************@fe04.lga...
Well, another basic type of question...amazing how much I've forgotten -
never was a VB guru, but. I can see I'll have to pick up a couple VB5
instruction books - any suggestions on a couple good (basic level)

learning
VB books?

Okay - in my database I have a sales total box (textsalestotal) and want

to
multiply whatever that figure is by .07617 which is Missouri tax - if I

just
use a click event to multiply, for example $30.34 * .07617 I of course get some number like 2.31099789xxxxx.

For the life of me (been looking over 2 hours) I can't find the format
command to output the answer to a proper currency figure like: Format
(txtsalestotal, "xx.xx") ??

Thanks for any help... :))

John


Jul 17 '05 #3
I'm lost...Why can't you just use the format function I provided and replace
the number with a variable, field, or whatever...

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"John L @yahoo.com>" <john_stlmo<removethis> wrote in message
news:GK*****************@fe03.lga...
No, it needs to be able to automatically convert any number to currency
format - I won't be inputting the number manually and the amount will vary
constantly. I have the data field set to currency - I'm surprised it
doesn't do it automatically anyway...?

Tried that code without success...

Any other thoughts? I used to do this routinely with just a very simply
format expression or truncate process or something -- which I've now forgot and can't seem to find anywhere.

All I want to do is convert any number within a certain field to currency
format of xx.xx

Thanks for the attempt though - it's appreciated...

John

"Veign" <me@home.com> wrote in message
news:BS***************@newsread2.news.atl.earthlin k.net...
Debug.Print Format$(2.31099789, "$#0.00")

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"John L @yahoo.com>" <john_stlmo<removethis> wrote in message
news:wv*******************@fe04.lga...
Well, another basic type of question...amazing how much I've forgotten - never was a VB guru, but. I can see I'll have to pick up a couple VB5
instruction books - any suggestions on a couple good (basic level)

learning
VB books?

Okay - in my database I have a sales total box (textsalestotal) and want
to
multiply whatever that figure is by .07617 which is Missouri tax - if
I
just
use a click event to multiply, for example $30.34 * .07617 I of course

get some number like 2.31099789xxxxx.

For the life of me (been looking over 2 hours) I can't find the

format command to output the answer to a proper currency figure like: Format
(txtsalestotal, "xx.xx") ??

Thanks for any help... :))

John



Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by ian | last post: by
3 posts views Thread by Vlad | last post: by
1 post views Thread by D. Shane Fowlkes | last post: by
6 posts views Thread by Brad | last post: by
4 posts views Thread by Mitchell Vincent | last post: by
14 posts views Thread by Scott M. | last post: by
9 posts views Thread by john coltrane | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.