Well, another basic type of question...amaz ing 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 3 11113
Debug.Print Format$(2.31099 789, "$#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<rem ovethis> wrote in message
news:wv******** ***********@fe0 4.lga... Well, another basic type of question...amaz ing 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
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******** *******@newsrea d2.news.atl.ear thlink.net... Debug.Print Format$(2.31099 789, "$#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<rem ovethis> wrote in message news:wv******** ***********@fe0 4.lga... Well, another basic type of question...amaz ing 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
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<rem ovethis> 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******** *******@newsrea d2.news.atl.ear thlink.net... Debug.Print Format$(2.31099 789, "$#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<rem ovethis> wrote in message news:wv******** ***********@fe0 4.lga... Well, another basic type of question...amaz ing 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ian |
last post by:
Hi guys, i'm trying to format the output of a record in access, which i am
pulling from through php (odbc) and the formatting is set at 4 decimal
places, which i don't want. i want currency and no decimal places.
I was trying to use this example, but i have no bloody idea howo to use it.
or where to put it for that matter:
<?php
$number = 1234.56;
|
by: Vlad |
last post by:
Hi,
I am trying to display a currency value formated according to the current
culture in ASP.NET:
decimal x = 125345.54M;
string currencyString = String.Format("{0:c}",x);
what gets retured is 125,345.54 without the currency symbol of $
I checked and re-checked my regional settings and tried it on other PCs
without success...
|
by: D. Shane Fowlkes |
last post by:
Hey guys. I have a Repeater and a Template. One of the dataitems calls a
helper function. The dataitem sends the record ID to the function and the
function runs a complex query and returns a calculation which is a dollar
amount. The ID is a "construction project" and the helper function goes and
determines how much money has already been spent against the project by
querying expenditure tables.
The function works fine but how can I...
|
by: Brad |
last post by:
I guess I still have not grasped the logic of formatting a simple label or
text box.
Why would the following not work? I need the resulting label to display
currency.
lblAmtDue.Text = CInt(txtEntries.Text) * 1.5
lblAmtDue.Text.Format("$#,##0.00")
|
by: Mitchell Vincent |
last post by:
How is everyone formatting currency with VB.NET?
Before I was calling the API function for it, which took the currency
symbol from the Windows settings. I've found this to be limited when
working with European countries where business in conducted in several
different currencies. Are you guys just storing a currency symbol and
formatting the number accordingly? What about the comma and decimal
switch that some locales use?
I hope .NET...
| |
by: pebelund |
last post by:
Hi
I got an .aspx that got the following code (example)
<td width="120">
<% = row %>
</td>
row takes a value from a SQL db, that is a string of numbers.
On the webbsite I want this to show as value formatted in thousands
(example: I get the value 12345678, and I want it to show like 12 345
|
by: Scott M. |
last post by:
Ok, this is driving me nuts...
I am using VS.NET 2003 and trying to take an item out of a row in a
loosely-typed dataset and place it in a label as a currency. As it is now,
I am getting my unformatted data values (as decimals) just fine, so I know
there's not a problem with the data retrieval, just the formatting.
I have read that this would work:
lblPrice.Text = prodRow.ToString("C");
|
by: scoarescoare |
last post by:
I am running into a problem that I cannot seem to solve.
I'm using ADO.NET 2.0 with vb 2005. I have a dataset as a datasource that selects all of the Shoe_Types from a Shoe_Type table. I am creating the data set and doing all of the data binding at runtime.
I then bind each label at run time by doing:
Me.lblShoeTypePrice.DataBindings.Add("text", Shoe_Type_DataTable, "Shoe_Price")
I'm not exactly sure how I should go about...
|
by: john coltrane |
last post by:
Is there way to create a formatted string in a similar that is similar to
sprintf?
The same for printing, printf?
C,D,E,F,G,N,X for currency, decimal, exponential, fixed, general, numerical,
and hex but these do not seem to allow for specifying the number of
decimals, left/right placement, or string formatting.
Thanks
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |