Home All Groups Group Topic Archive Search About

Easy Value Compare Question

Author
8 Aug 2006 6:21 PM
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

Author
8 Aug 2006 6:41 PM
Scott M.
Dim A, B as String

A = textbox1.text
B = textbox2.text

If Not A = B Then A = B



Show quoteHide quote
"Y2K" <y2khi***@gmail.com> wrote in message
news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
>
Author
8 Aug 2006 7:42 PM
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:
Show quoteHide quote
> Dim A, B as String
>
> A = textbox1.text
> B = textbox2.text
>
> If Not A = B Then A = B
>
>
>
> "Y2K" <y2khi***@gmail.com> wrote in message
> news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
> >
Author
8 Aug 2006 8:25 PM
Terry
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


Show quoteHide quote
"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" <y2khi***@gmail.com> wrote in message
> > news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
> > >
>
>
Author
8 Aug 2006 9:47 PM
Y2K
Perfect!  Thanks Terry.  Knew there was an indirect var needed
somewhere.  Works as expected.


Terry wrote:
Show quoteHide quote
> 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" <y2khi***@gmail.com> wrote in message
> > > news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
> > > >
> >
> >
Author
9 Aug 2006 3:07 AM
GhostInAK
Hello Y2K,

You have got to be kidding.

-Boo

Show quoteHide quote
> 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" <y2khi***@gmail.com> wrote in message
>>>> news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
>>>>>
Author
9 Aug 2006 5:03 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"GhostInAK" <ghosti***@gmail.com> schreef in bericht
news:be1391bf12b6d8c8893516b5c163@news.microsoft.com...
> 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" <y2khi***@gmail.com> wrote in message
>>>>> news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
>>>>>>
>
>
Author
9 Aug 2006 5:11 PM
Y2K
-Boo

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

GhostInAK wrote:
Show quoteHide quote
> 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" <y2khi***@gmail.com> wrote in message
> >>>> news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
> >>>>>
Author
10 Aug 2006 3:04 AM
GhostInAK
Hello Y2K,

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

-Boo

Show quoteHide quote
> -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" <y2khi***@gmail.com> wrote in message
>>>>>> news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
>>>>>>>
Author
8 Aug 2006 8:29 PM
Scott M.
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.

Show quoteHide quote
"Y2K" <y2khi***@gmail.com> wrote in message
news:1155066136.617192.50220@b28g2000cwb.googlegroups.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" <y2khi***@gmail.com> wrote in message
>> news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
>> >
>
Author
8 Aug 2006 8:31 PM
Terry
And...
   You could create a class,  with two string properties and when you set
one, the other changes also.
--
Terry


Show quoteHide quote
"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" <y2khi***@gmail.com> wrote in message
> > news:1155061263.587120.263920@m79g2000cwm.googlegroups.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
> > >
>
>