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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wierd result: CurAfterWitholdingTax = CurGross * 0.23

Status
Not open for further replies.

Big1934

Programmer
Jul 1, 2009
33
US
CurAfterWitholdingTax = CurGross * CurPercentWithHoldingTax

so basic but is my logic wrong, i get for CurAfterWitholdingTax the value of -42500 or a negative number similar to that. the value of CurPercentWithHoldingTax is 0.23 which is grabbed from a forms text box.

I am not suprised if the answer is obvious to you all, but its been 3 years since programming in VBA!
Thanks!
 


Hi,
CurAfterWitholdingTax the value of -42500

CurPercentWithHoldingTax is 0.23

What is the value of CurGross?



Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
looks more like a " ... Somebody done somebody wrong ... " song.

The math presented does not provide the values.



MichaelRed


 
well i test the sequence in a regular calculator and got the correct results

gross(55000) * PercentWithholdRate(.23) = taxwithheld

\hmmm
 
so, first post incorrect / incomplete.

possible overwrite of results between your (expected) calc and post?

variables changed elsewhere in process?



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top