I think maybe I should have been clearer.
Example A uses Else
Example B is 2 seperate statements
They both should come to the same conclusion, however, when I use the Else
statement it doesn't work. If I seperate the logic into 2 statements it
works.
What I am saying is:
If [txtLength]>0 and [txtGauge]>0 and Not IsNull(TPID....)
then Me.txtTolling = TollingPrice(...)
OR
If [txtLength]>0 and [txtGauge]>0 and IsNull(TPID....)
then Me.txtTolling = TPID(...)
It's the Not IsNull / IsNull that is different. Hope I expalined that
better.
Gina
You missed my point, but I could've been clearer. :-)
Your 2 examples start off the same but divurge significantly and will
provide different results
ExampleA - Part 1: If 1 ,2 and 3 are ALL True, do this.
ExampleA - Part 1: otherwise do this (i.e., if *any* or *all* of 1, 2, 3 are
False)
ExampleB - part 1: If 1, 2 and 3 are ALL True, do this.
ExampleB - part 2: If both 1 and 2 are True and 3 is False, do this.
Your Part 1's are the same. Your Part 2's are not. Example A will act, one
way or the other, on ALL permutations of the 3 conditions. Example B only
acts on TTT and TTF. It does nothing with TFF, FTF, FFT and FFF
permutations. I have to assume the "do nothing" aspect is what you like
about the results of Example B (you never did provide a definition of "it
works", but I didn't ask either.).
Since it seems you only want to act when 1 and 2 are both True, I broke that
out as a primary condition. Only when that condition is met do you need to
do a nested 2nd check for Null and react accordingly.
HTH,

Signature
George Nicholson
Remove 'Junk' from return address.
>I think maybe I should have been clearer.
>
[quoted text clipped - 81 lines]
>>> Thanks,
>>> Gina
Gina Whipp - 01 Feb 2006 02:41 GMT
Okay, I understand now.... thanks for taking the time to explain it. I
guess I didn't COMPLETELY read your answer.
Thanks,
Gina
> You missed my point, but I could've been clearer. :-)
>
[quoted text clipped - 106 lines]
>>>> Thanks,
>>>> Gina