Solved

VB6 Convert textbox negative amount in positive

Posted on 2006-07-14
3
395 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
Comment Utility
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
Comment Utility
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
Comment Utility
Tks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
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…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

744 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

9 Experts available now in Live!

Get 1:1 Help Now