Click here to Skip to main content
11,709,844 members (71,563 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-server-2005 VB.NET , +
Hi Experts! i have question on how can check the value from another textbox to another.

this is my vb form:
http://www.photoshop.com/users/akosibogart/albums/a9cad965db544867983c83e9fdac8b2d/view#026c9a9ac51f46a38e8bb04fc1735d39[^]

my code:
http://www.photoshop.com/users/akosibogart/albums/a9cad965db544867983c83e9fdac8b2d/view#9efc1ec900294ea9b5bbb50ffa9d4b4d[^]

Problem:
as u can see in the picture. " yEs" is wrong because letter "E" is on capital letter.. i want to make it check as long as the user type the right answer. plss help..
Posted 15-Jan-13 17:47pm
Edited 29-Jan-13 23:53pm
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,

You can keep your two textbox values in two different variables, and then use the following code:

string1 = "Alaska"
string2 = "California"
 
result = StrComp(string1,string2,vbTextCompare)
 
' result = 0 if the strings are identical (case-insensitive)
' result = -1 if string1 is lexicographically less than string2
' result = 1 if string1 is lexicographically greater than string2

Thanks
  Permalink  
Comments
akosibogart at 30-Jan-13 5:57am
   
sir my question and answer are taken from the database.in which part of my code should i put your code? string1,string2 and result "are not diclare..huhuu" help
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 514
1 OriginalGriff 250
2 Peter Leow 229
3 Maciej Los 185
4 Mika Wendelius 175
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,037
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100