Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
| Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 12th, 2004, 05:46 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to creative_eye
Default calculate value on Lost Focus of text field

Hi there,

I have three text boxes on the form. First is for the total amount (that is the total due amount for the client), enter by the user. Second text box is for to enter the value (payment) which user pays. In the third text box i want the calculate value (i.e total value - current value entered) on the Lost Focus event of second text box.

Plz guide me in this.

 
Old April 12th, 2004, 08:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Put this in your LostFocus event for text box 2:

Text3Name.Text = cint(Text1Name.Text)-cint(Text2Name.Text)

Replace the "TextName" with the names of your text boxes. Also, you will probably want to do validation to make sure they are numbers.

J




Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost Focus of Dynamic Textfield dpkbahuguna Beginning VB 6 8 November 27th, 2007 01:03 AM
Form lost focus color change dthrun VB How-To 1 March 30th, 2007 10:41 PM
Tell me following problem of lost focus amit_mande@yahoo.com VB.NET 2002/2003 Basics 1 November 13th, 2006 12:42 PM
Move focus to field without selecting text echovue Access VBA 1 April 12th, 2006 01:52 AM
Focus on a text input field fizzerchris Classic ASP Basics 0 December 16th, 2005 09:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.