473,748 Members | 11,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

currency format in a textbox



Hi,

My db is stored in access and I have a field amount and its type is
currency.

When I read from the db and display it in a textbox, it shows me
15000000 instead of $150,000.00.

How can I do so it can shows me currency format?

Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
3 6152
Did you set the format of the control in your form to Currency? If you
do that you should be able to choose the formatting you want.

Nov 13 '05 #2

Already did, but nothing happens..

I'm using this sub procedure

Private Sub LoadControls(By Ref rs As ADODB.Recordset )
On Error Resume Next
If rs.EOF Or rs.BOF Then Exit Sub

amount = rs("amount")

Text4.Text = amount


Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3
Try changing

Text4.Text = amount
to

Text4.Text = Format(amount," $0,000.00")

"Claudia Fong" <cd********@yah oo.co.uk> wrote in message
news:2q******** *********@news. uswest.net...


Hi,

My db is stored in access and I have a field amount and its type is
currency.

When I read from the db and display it in a textbox, it shows me
15000000 instead of $150,000.00.

How can I do so it can shows me currency format?

Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
14574
by: Patrick J. Schouten | last post by:
I am new to ASP/VBScript and I am trying to format a texbox when a user exits it. In Visual Basic you could put the following in the Exit property of the textbox: textbox1 = Format(textbox1, "Currency") Is this possible in ASP/VbScript? Any help appreciated. Please show code in your reply, especially where to put this code in the asp page? Thanks.
1
1722
by: J.J. | last post by:
Hi, i have in my table/form two fields, first is number_field(decimal) and second is combo with two values from other table(USD and EURO). now i want that after i select USD the number_field is formated as Currency and if i select EURO than as Euro. how can i make this happen? many thanks J.J.
4
22596
by: Gerry Abbott | last post by:
Hi All. How can i put a zero decimal for my currency into my format statement, == & ", for " & & " days. Cost " & Format(,"Currency") which is the data source for a textbox on a report
3
31984
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 ***
0
320
by: Claudia Fong | last post by:
Hi, My db is stored in access and I have a field amount and its type is currency. When I read from the db and display it in a textbox, it shows me 15000000 instead of $150,000.00. How can I do so it can shows me currency format?
2
8847
by: Juan | last post by:
I get a number from db and display it in a textbox control, how can i format the value as currency? thanks, Juan.
5
4562
by: cwbp17 | last post by:
Hi all, Have a datagrid that displays the price column of a table. Went to the Datagrid's Property builder and set the 'Data Formatting expression' for the PRICE column to {0:c}, so that the dollar sign, the comma, and the decimal are included (i.e. $44,644.48) Managed to update the price column of the datagrid back to the database, as long as, the user doesn't delete the dollar sign (in the 0 position).
3
6682
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)
1
7494
by: =?Utf-8?B?eXVyaWtz?= | last post by:
Hey, I'm building a business application that needs input of currency data. I looked a lot around google and friends for a good custom control to provide interactive validation and formatting of the value. What I need would be a WinForms textbox control that: - Correctly formats the number according to locales - Supports negative values - Displays thousands separators correctly
0
8828
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,...
0
9537
Oralloy
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...
0
9367
jinu1996
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...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8241
agi2029
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...
1
6795
isladogs
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...
0
6073
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();...
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.