473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Formatting

sue
Hi,

Is there a way to format a textbox such that when the
user types in the number 4000 it will be automatically
formatted to $4,000?

Thanks.
Jul 19 '05 #1
5 1257
It could be done in a client-side script, but not ASP. ASP could only alter
the input after it is submitted to the server where the ASP runs.

--

Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
"sue" <su*@discussions.microsoft.com> wrote in message
news:99****************************@phx.gbl...
Hi,

Is there a way to format a textbox such that when the
user types in the number 4000 it will be automatically
formatted to $4,000?

Thanks.

Jul 19 '05 #2
This can be done using VBScript

Sub textbox_onfocusout
document.form1.textbox.value = FormatCurrency(document.form1.textbox.value)
End Sub
"sue" <su*@discussions.microsoft.com> wrote in message
news:99****************************@phx.gbl...
Hi,

Is there a way to format a textbox such that when the
user types in the number 4000 it will be automatically
formatted to $4,000?

Thanks.

Jul 19 '05 #3
CJM
What? On my Firefox browser? I dont think so...

CJM

"Suchi" <su***@inapp.com> wrote in message
news:ux*************@TK2MSFTNGP11.phx.gbl...
This can be done using VBScript

Sub textbox_onfocusout
document.form1.textbox.value = FormatCurrency(document.form1.textbox.value) End Sub

Jul 19 '05 #4
CJM wrote:
This can be done using VBScript


What? On my Firefox browser? I dont think so...


The beauty of Firefox, of course, is that a VBScript extension could
conceivably be written for it (not that anyone in the Gecko development or
user community would want to).

OTOH, if FormatCurrency really does achieve the desired result, a server
round-trip would suffice.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #5
I'd recommend a client side JavaScript. This will work in most browsers
too. Try posting in the Jscript newsgroup or a JavaScript newsgroup for
more details, as it is out of the scope of this newsgroup.

sue wrote:
Hi,

Is there a way to format a textbox such that when the
user types in the number 4000 it will be automatically
formatted to $4,000?

Thanks.


Jul 19 '05 #6

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

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
2
by: Colleyville Alan | last post by:
I am using Access and have embedded the ActiveX control Formula One that came with Office 2000. (ver 3.04). I have created and formatted a spreadsheet and now I want to copy the info with...
4
by: DBQueen | last post by:
I have a subform which is in Continuous Forms view. I have added a button to the bottom of the page to move to the next record using the button wizard (result: DoCmd.GoToRecord , , acNext). I...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
4
by: hope | last post by:
Hi, How can I format a string field using Data Formatting Expression property in datagrid? For example: format last name from BROWN to Brown. Thanks
7
by: L. Scott M. | last post by:
Have a quick simple question: dim x as string x = "1234567890" ------------------------------------------------------- VB 6 dim y as string
8
by: gopal | last post by:
Hi I am trying to write to log file but the formatting of string is not properly aligned in log file result The results looks some thing like this OK move.xml Successful OK ...
8
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works...
4
by: midlothian | last post by:
Hello, I have conditional formatting set up on a subform based on a calculated value in the underlying query. For instance, if Sales are >$1000, the query displays "Yes," otherwise it displays...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.