check initial charecters of a text...

Thread Solved

Join Date: Aug 2008
Posts: 53
Reputation: smile4evr is an unknown quantity at this point 
Solved Threads: 2
smile4evr's Avatar
smile4evr smile4evr is offline Offline
Junior Poster in Training

check initial charecters of a text...

 
0
  #1
Nov 11th, 2008
hi... i have a small doubt in hw to check the initial charecters in text... like if the first two letters of my text is OS or TP... so based on that i should be able to select which database to select...
and one more doubt is dat suppose i want to check the status of a request then the corresponding details of that id only should open.. so do i need a multiple select statement... or is it possible to have select statement for more than one field???

please reply!

thanking in advance!
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 45
Reputation: AUGXIS is an unknown quantity at this point 
Solved Threads: 11
AUGXIS's Avatar
AUGXIS AUGXIS is offline Offline
Light Poster

Re: check initial charecters of a text...

 
0
  #2
Nov 12th, 2008
hi. you can left command
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. If Left(Text1.Text, 2) = "OS" Then
  2. rs.open"select * from table"
  3. Elseif Left(Text1.Text, 2) = "TP" Then
  4. rs1.open"select * from table1"
  5. else
  6. rs2.open"select * from table2"
  7. end if
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 53
Reputation: smile4evr is an unknown quantity at this point 
Solved Threads: 2
smile4evr's Avatar
smile4evr smile4evr is offline Offline
Junior Poster in Training

Re: check initial charecters of a text...

 
0
  #3
Nov 12th, 2008
hi the left command worked perfect.... can you please clarify my other doubt also... that is if we can select multiple fields from a dabase and show it at the VB front end???

Originally Posted by AUGXIS View Post
hi. you can left command
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. If Left(Text1.Text, 2) = "OS" Then
  2. rs.open"select * from table"
  3. Elseif Left(Text1.Text, 2) = "TP" Then
  4. rs1.open"select * from table1"
  5. else
  6. rs2.open"select * from table2"
  7. end if

thanx a lot for the help!!!
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 45
Reputation: AUGXIS is an unknown quantity at this point 
Solved Threads: 11
AUGXIS's Avatar
AUGXIS AUGXIS is offline Offline
Light Poster

Re: check initial charecters of a text...

 
0
  #4
Nov 12th, 2008
hi. just select the field you're gonna use.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. rs.open"select emp_name, emp_address from tbl_emp"
  2. text1=rs.fields("emp_name")
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 53
Reputation: smile4evr is an unknown quantity at this point 
Solved Threads: 2
smile4evr's Avatar
smile4evr smile4evr is offline Offline
Junior Poster in Training

Re: check initial charecters of a text...

 
0
  #5
Nov 12th, 2008
hey thankx a lot... it worked great!.....
THANKX A LOOOTT!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC