469,085 Members | 1,042 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,085 developers. It's quick & easy.

Easy Value Compare Question

Y2K
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I'm doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA

Aug 8 '06 #1
10 1092
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I'm doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA

Aug 8 '06 #2
Y2K
Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.
Scott M. wrote:
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I'm doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA
Aug 8 '06 #3
You need to keep a third value:
A=B=C

and then when you need to do your check ....
If A <C then
C = A
B = A
elseif B <C then
C = B
A = B
endif

--
Terry
"Y2K" wrote:
Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.
Scott M. wrote:
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I'm doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.
>
TIA
>

Aug 8 '06 #4
Compare both what? If you compare A against B, what else is there to
compare?

And make each value the same as what's last changed value?

Could you be more clear on what you need? This seems like simple If...Then
logic.

"Y2K" <y2******@gmail.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.
Scott M. wrote:
>Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googleg roups.com...
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I'm doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA

Aug 8 '06 #5
And...
You could create a class, with two string properties and when you set
one, the other changes also.
--
Terry
"Y2K" wrote:
Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.
Scott M. wrote:
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I'm doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.
>
TIA
>

Aug 8 '06 #6
Y2K
Perfect! Thanks Terry. Knew there was an indirect var needed
somewhere. Works as expected.
Terry wrote:
You need to keep a third value:
A=B=C

and then when you need to do your check ....
If A <C then
C = A
B = A
elseif B <C then
C = B
A = B
endif

--
Terry
"Y2K" wrote:
Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.
Scott M. wrote:
Dim A, B as String
>
A = textbox1.text
B = textbox2.text
>
If Not A = B Then A = B
>
>
>
"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Any suggestions to compare two values, and if either value changes,
then both values now become the changed values. Right now I'm doing it
with a textbox and onchange event, but would like to get rid of the
textbox and use internal variables.

TIA
Aug 8 '06 #7
Hello Y2K,

You have got to be kidding.

-Boo
Perfect! Thanks Terry. Knew there was an indirect var needed
somewhere. Works as expected.

Terry wrote:
>You need to keep a third value:
A=B=C
and then when you need to do your check ....
If A <C then
C = A
B = A
elseif B <C then
C = B
A = B
endif
--
Terry
"Y2K" wrote:
>>Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.

Scott M. wrote:

Dim A, B as String

A = textbox1.text
B = textbox2.text
If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googl egroups.com...
Any suggestions to compare two values, and if either value
changes, then both values now become the changed values. Right
now I'm doing it with a textbox and onchange event, but would like
to get rid of the textbox and use internal variables.
>
TIA
>

Aug 9 '06 #8
Boo,

I had something the same with a problem my wife had yesterday. For most of
us (developing for a long time), logical thinking in this way is a second
nature, not all people are trained to think logical in this way and often
find it crazy as we do it and it takes than a long time to learn that.

That is probably why we sometimes don't understand people who don't do
computer development, because things are in our eyes often so logical..

Just my thought,

:-)

Cor

"GhostInAK" <gh*******@gmail.comschreef in bericht
news:be**************************@news.microsoft.c om...
Hello Y2K,

You have got to be kidding.

-Boo
>Perfect! Thanks Terry. Knew there was an indirect var needed
somewhere. Works as expected.

Terry wrote:
>>You need to keep a third value:
A=B=C
and then when you need to do your check ....
If A <C then
C = A
B = A
elseif B <C then
C = B
A = B
endif
--
Terry
"Y2K" wrote:

Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.

Scott M. wrote:

Dim A, B as String
>
A = textbox1.text
B = textbox2.text
If Not A = B Then A = B
>
"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.goog legroups.com...
>Any suggestions to compare two values, and if either value
>changes, then both values now become the changed values. Right
>now I'm doing it with a textbox and onchange event, but would like
>to get rid of the textbox and use internal variables.
>>
>TIA
>>


Aug 9 '06 #9
Y2K
-Boo

Thanks for that helpful post. That attitude should take you far in
life.

GhostInAK wrote:
Hello Y2K,

You have got to be kidding.

-Boo
Perfect! Thanks Terry. Knew there was an indirect var needed
somewhere. Works as expected.

Terry wrote:
You need to keep a third value:
A=B=C
and then when you need to do your check ....
If A <C then
C = A
B = A
elseif B <C then
C = B
A = B
endif
--
Terry
"Y2K" wrote:

Scott,

Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.

I need to compare both, and make each value the same as the last
changed value.

Scott M. wrote:

Dim A, B as String

A = textbox1.text
B = textbox2.text
If Not A = B Then A = B

"Y2K" <y2******@gmail.comwrote in message
news:11**********************@m79g2000cwm.google groups.com...
Any suggestions to compare two values, and if either value
changes, then both values now become the changed values. Right
now I'm doing it with a textbox and onchange event, but would like
to get rid of the textbox and use internal variables.

TIA
Aug 9 '06 #10
Hello Y2K,

You're welcome. Your lazyness and/or idiocy will probably kill you ealy
in life.

-Boo
-Boo

Thanks for that helpful post. That attitude should take you far in
life.

GhostInAK wrote:
>Hello Y2K,

You have got to be kidding.

-Boo
>>Perfect! Thanks Terry. Knew there was an indirect var needed
somewhere. Works as expected.

Terry wrote:

You need to keep a third value:
A=B=C
and then when you need to do your check ....
If A <C then
C = A
B = A
elseif B <C then
C = B
A = B
endif
--
Terry
"Y2K" wrote:
Scott,
>
Thanks for the reply, but that's not going to work, as it's only
comparing A to B and making A equal to B.
>
I need to compare both, and make each value the same as the last
changed value.
>
Scott M. wrote:
>
>Dim A, B as String
>>
>A = textbox1.text
>B = textbox2.text
>If Not A = B Then A = B
>"Y2K" <y2******@gmail.comwrote in message
>news:11**********************@m79g2000cwm.goo glegroups.com...
>>Any suggestions to compare two values, and if either value
>>changes, then both values now become the changed values. Right
>>now I'm doing it with a textbox and onchange event, but would
>>like to get rid of the textbox and use internal variables.
>>>
>>TIA
>>>

Aug 10 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by ben3003 | last post: by
4 posts views Thread by John Vottero | last post: by
19 posts views Thread by Dennis | last post: by
26 posts views Thread by Ping | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.