Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to calculate 2

Status
Not open for further replies.

nijan

MIS
Jul 6, 2001
9
MY
hi..
i wish to make a calculation, where the formula is
balance=require-recruit
i have there textbox; txtRequire,txtRecruit,txtBalance
the balance is automatically calculate after i fill in the txtRequire and txtRecruit
mm..how to do this? since i'm not familiar with foxpro coding, can anyone help me with the tips using project manager? using project manager is quite simple for me, as a beginner rite?
 
nijan

In the .Valid events of .txtRequire and .txtRecruit put:-

WITH THISFORM
[tab]IF !EMPT(.txtRequire) AND !EMPT(.txtRecruit)
[tab][tab].txtBalance.Value = .txtRequire.Value -.txtRecruit.Value
[tab]ENDI
ENDW

That should get you started.

Chris :)
 
nijan

In the .Valid events of .txtRequire and .txtRecruit put:-

WITH THISFORM
[tab]IF !EMPT(.txtRequire.Value) AND !EMPT(.txtRecruit.Value)
[tab][tab].txtBalance.Value = .txtRequire.Value -.txtRecruit.Value
[tab]ENDI
ENDW

That should get you started.

Chris :)
 
nijan

Ignore the first post - it is incorrect.

There is currently a problem with "Submit post"

Chris :)
 
You could also use the interactive change event, I always find it nice to see calculations happen while you type.
We use this to show our customers the amount in company currecny and EURO's.

Be sure you are using the right (number) format in your textboxes.


HTH,
Weedz (Wietze Veld)
My private project:And especially for VFP rookies:
 
dear chris..
thanks a lot..that help me much!! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top