473,881 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

show text box in a currency value

295 Recognized Expert Contributor
I have a text box that holds a value of 300 how do I make it show $ 300.00, not to mention their are multiple records that have 1200, 900, and I want them to display with the dollar sign.
Jan 13 '07 #1
2 1714
6 New Member
Hello maximas4

you could use "format" to do it.
Expand|Select|Wrap|Line Numbers
  1. Format(300, "currency")
The result is "$300.00".
Hope that helps.
Jan 14 '07 #2
121 New Member
I wrote my own Currency class, since .Net does not contain one. This way, when I retrieve values from a database, I always have a value of at least 0.00, and I can add commas ($ 4,098.50), etc. Just something to think about.
Jan 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Glenn Profitt | last post by:
Hi, I am using a text box as the subject for an invoice email. The textbox works fine for listing individual fields from the tblOrders table as shown below: ="Hi, " & & " " & "Your order is as follows:" & " " & " " & "Order ID: " & & " " & " Order Date: " & Format(,"Short Date") & " " & " Ship Via: " &
by: Scott Gorman | last post by:
I have created a report in access. I had to add a text box to input a value for previous months balance. I have formatted to display with $ currency, and also with the " , " for thousand separator. I have not been able to get it to display correctly. It is just the numbers without the formatting. Please help !!! *** Sent via Developersdex http://www.developersdex.com ***
by: Alberto | last post by:
I have a decimal field in a SQL Server DataBase who stores money and I want to show it in a TextBox and in a ListView controls in C#. If I do: txtMoney.Text = Convert.ToSingle(dr); I see something like: "4.0000" instead "4.00 ?" How can I solve this? Thank you very much
by: Chris | last post by:
I wanted to display the "$" in front of a few currency textboxes. So I thought this code would do the trick, and my Return FormatCurrency(MyBase.Text) does run, but the textbox still shows the unformatted text in the box. What am I doing wrong? Chris Public Overrides Property Text() As String Get Select Case m_Mask
by: Kathy | last post by:
I would like to get the old and new value for a change made to a text box so that I can store them in a change history table. What is the best way to do this? I am just learning VB 2005; porting an application from MS Access where I could just use the TextBox.OldValue construct. TIA, Kathy
by: mracuraintegra | last post by:
I am seriously at my wits' end here with this. I've got a textbox bound to a money column in a database, but it shows up as a decimal value, meaning that $9.25 shows up as 9.250000. ARRRRG. Here's what I've tried: * String.Format("{0:C}", txtCalcValue.Text) (guess this only works on console...) * Masked text box with ###.## mask * txtCalcValue.Text = txtCalcValue.Remove(txtCalcValue.Length, 4)
by: mereba | last post by:
Hello My country Ghana is changing its currency. I want to write a small programme in C++ that can covert from the old currency into the new one. I would like this programme to run behind a simple calculator- looking interface. I'm quite new to C++, and I would need some help. Please any suggestion is welcome :) The following is what I have been able to do so far:
by: bhanubalaji | last post by:
hi, I am unable to disable the text(label) in javascript..it's working fine with IE,but i am using MOZILLA.. can any one help regarding this.. What's the wrong with my code? I am sending my code here.. Thanks in Advance... Regards
by: BerkshireGuy | last post by:
On an unbound form, I have a combobox called 'cboproducttype' and a text box called 'txtamountappliedfor'. I have an Add button that I would like the user to be able to hit once a product and amount applied for has been entered. This should populate an unbound listbox to display their selections. A user can select one or more sets of product types and the amount applied for. They should also have the functionality to remove a 'set' if...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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: 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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.