 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: If Statement isn&#8217;t evaluating out correctly</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 13:24:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: rbrown38059</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/#comment-62621</link>
		<dc:creator>rbrown38059</dc:creator>
		<pubDate>Thu, 23 Apr 2009 12:03:22 +0000</pubDate>
		<guid isPermaLink="false">#comment-62621</guid>
		<description><![CDATA[The only difference in the code is that I added a &#039;between&#039; value.  Before, it only had &gt; or &gt;= values.  I added the &lt; value for the in between numbers that need to be &gt;= one and &lt; the other.  I guess what made me think to try it was the fact that I have to do that when I code VBA in Access...

Ruth]]></description>
		<content:encoded><![CDATA[<p>The only difference in the code is that I added a &#8216;between&#8217; value.  Before, it only had &gt; or &gt;= values.  I added the &lt; value for the in between numbers that need to be &gt;= one and &lt; the other.  I guess what made me think to try it was the fact that I have to do that when I code VBA in Access&#8230;</p>
<p>Ruth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/#comment-62592</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Wed, 22 Apr 2009 18:47:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-62592</guid>
		<description><![CDATA[I&#039;m glad you figured it out, and thanks for sharing, but I don&#039;t see the difference with the original code.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m glad you figured it out, and thanks for sharing, but I don&#8217;t see the difference with the original code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbrown38059</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/#comment-62578</link>
		<dc:creator>rbrown38059</dc:creator>
		<pubDate>Wed, 22 Apr 2009 12:35:43 +0000</pubDate>
		<guid isPermaLink="false">#comment-62578</guid>
		<description><![CDATA[I will try to give a little better answer about what I am seeing...  When I go into Runtime, no matter what value I enter for txtOrderTotal.Text, I get the same dDiscountTotal.  

If I put in 550 for txtOrderTotal.Text, I should see a 20% discount.  If I put in 300, I should get a 15% discount.  If I put in 100, I should see a 10% discount.  Less than 100 should get no discount.  

What I am seeing is that for any OrderTotal (500, 300, 100, 50) I get the same 20% discount.  It&#039;s like the code is ignoring the additional statements.  Just reading through the code, it looks like it should work, but I am working on my first true exercise in this textbook and am probably overlooking something.  That&#039;s why I asked about the use of the .text ending on the txtOrderTotal.text - could it not be converting the text to number correctly?  I even tried it using the Select Case method &amp; got the same thing...

I really appreciate you guys trying to help me out.  
Ruth]]></description>
		<content:encoded><![CDATA[<p>I will try to give a little better answer about what I am seeing&#8230;  When I go into Runtime, no matter what value I enter for txtOrderTotal.Text, I get the same dDiscountTotal.  </p>
<p>If I put in 550 for txtOrderTotal.Text, I should see a 20% discount.  If I put in 300, I should get a 15% discount.  If I put in 100, I should see a 10% discount.  Less than 100 should get no discount.  </p>
<p>What I am seeing is that for any OrderTotal (500, 300, 100, 50) I get the same 20% discount.  It&#8217;s like the code is ignoring the additional statements.  Just reading through the code, it looks like it should work, but I am working on my first true exercise in this textbook and am probably overlooking something.  That&#8217;s why I asked about the use of the .text ending on the txtOrderTotal.text &#8211; could it not be converting the text to number correctly?  I even tried it using the Select Case method &amp; got the same thing&#8230;</p>
<p>I really appreciate you guys trying to help me out.<br />
Ruth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mshen</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/#comment-62560</link>
		<dc:creator>mshen</dc:creator>
		<pubDate>Tue, 21 Apr 2009 23:54:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-62560</guid>
		<description><![CDATA[The code does look like it works.  Do you mean lblDiscountAmount.Text = dDiscountAmount or lblInvoiceTotal.Text doesn&#039;t change?]]></description>
		<content:encoded><![CDATA[<p>The code does look like it works.  Do you mean lblDiscountAmount.Text = dDiscountAmount or lblInvoiceTotal.Text doesn&#8217;t change?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/#comment-62557</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Tue, 21 Apr 2009 22:44:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-62557</guid>
		<description><![CDATA[When you say &quot;No matter what value I put into txtOrderTotal&lt;b&gt;.Text&lt;/b&gt;, I get the same dDiscountTotal&quot;, you mean that you are entering values in the txtOrderTotal box at runtime, right ?  Or are you trying assigning values to it programmatically ?

I have just created a test project with a text box, two labels and a button, and copied your code, and it works ok for me.]]></description>
		<content:encoded><![CDATA[<p>When you say &#8220;No matter what value I put into txtOrderTotal<b>.Text</b>, I get the same dDiscountTotal&#8221;, you mean that you are entering values in the txtOrderTotal box at runtime, right ?  Or are you trying assigning values to it programmatically ?</p>
<p>I have just created a test project with a text box, two labels and a button, and copied your code, and it works ok for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/#comment-62555</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Tue, 21 Apr 2009 22:00:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-62555</guid>
		<description><![CDATA[And, what value are you getting for dDiscountTotal ?]]></description>
		<content:encoded><![CDATA[<p>And, what value are you getting for dDiscountTotal ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.015 seconds using memcached
Object Caching 338/341 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-23 14:20:03 -->