Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB6 Convert textbox negative amount in positive

Posted on 2006-07-14
3
Medium Priority
?
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
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…
Simple Linear Regression

705 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