473,395 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1207
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: ben3003 | last post by:
I am only asking for my code to do a simple thing but for some reason i just can't get it to do what i want it to do... it been bugging me all day! The user inputs 2 dates on one page. in the...
9
by: Russ Perry Jr | last post by:
I'm using "ID" and "Value" in the generic sense here... Let's say one page I had a <html:select> with a collection like this: <html:options collection="items" property="key"...
2
by: FLEB | last post by:
Okay, so I've got this XML: <qa> <questionset> <question name="yourname">What is your name?</question> <question name="yourquest">What is your quest?</question> <question name="favcolor"> What...
4
by: John Vottero | last post by:
When a class contains a TimeSpan property, XmlSerializer doesn't work. A TimeSpan property is serialized like: <MySpan /> I've read a number of posts that talk about why this happens and how...
18
by: Mike Bartels | last post by:
Hi Everyone! I have two Arrays A and B. Both arrays are byte arrays with 7 bytes each. The contents of array A and B are the same A = {1, 2, 3, 4, 5, 6, 7}; B = {1, 2, 3, 4, 5, 6, 7}; When...
19
by: Dennis | last post by:
I have a public variable in a class of type color declared as follows: public mycolor as color = color.Empty I want to check to see if the user has specified a color like; if mycolor =...
9
by: Steven | last post by:
Hello, I have a question about strcmp(). I have four words, who need to be compared if it were two strings. I tried adding the comparison values like '(strcmp(w1, w2) + strcmp(w3, w4))', where...
0
by: Zark3 | last post by:
Hi all, In a web form I use a for loop to dynamically add TextBox'es to a page (one for each item in an input file). I can get the input values and I can display them in Label's and TextBox'es....
26
by: Ping | last post by:
Hi, I'm wondering if it is useful to extend the count() method of a list to accept a callable object? What it does should be quite intuitive: count the number of items that the callable returns...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.