Solved

VB6 Convert textbox negative amount in positive

Posted on 2006-07-14
3
397 Views
Last Modified: 2008-02-01
Sir, I have two textbox on my form one for user entering second one for getting information from first one textbox and save into database

If the user enter data in minus (-100) then first one textbox also get, and show negative amount (-100) as per my system (scenario) first textbox is right but I want when the second textbox get information from first textbox it automatically convert from negative to positive amount. Please help how to do this.
Rgds.
Mehram

0
Comment
Question by:Mehram
  • 2
3 Comments
 

Author Comment

by:Mehram
ID: 17106319
Revised
--------
Sir, I have two textbox on my form one for user entering second one for getting information from first one textbox and
save into database

If the user enter data in minus (-100) then second one textbox also get, and show negative amount (-100) as per my system (scenario) first textbox is right but I want when the second textbox get information from first textbox it automatically convert from negative to positive amount. Please help how to do this.
Rgds.
Mehram


0
 
LVL 44

Accepted Solution

by:
bruintje earned 500 total points
ID: 17106327
Hi Mehram,
----------

you could use the ABS function like

if IsNumeric(Text1.Text) then Text2.Text = Abs(Val(Text1.Text))

----------
bruintje
share what you know, learn what you don't
0
 

Author Comment

by:Mehram
ID: 17106379
Tks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sumDigits  challenge 7 74
count8 challlenge 13 116
create an incrementing variable name AutoHotKey 5 76
python question 5 69
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now