|
-
Mar 16th, 2002, 03:17 PM
#1
Thread Starter
Lively Member
use .Find
i have a textbox where i type in wut i want to search for named txtSearch ..
how do i code in the SEarch button so that.. in my data grid, an arrow will be pointed to the value i typed in txtSearch?
-
Mar 16th, 2002, 05:22 PM
#2
Are you ultimatly going to use that to retrieve a record
from a DataBase?
-
Mar 16th, 2002, 08:58 PM
#3
Thread Starter
Lively Member
i jsut want to know how to do it..
this is my code for the search button, i want to capture wut the user typed in the textbox and search for that word or number or whatever
VB Code:
Private Sub searchRes_Click()
With Adodc1.Recordset
.MoveFirst
.Find "[Bus No] = 'txtsearch.text'"
End With
End Sub
i kept getting error.. but if i replac txtsearch.text with a value, it works.. let's say 231.. my find button works then, cant it capture the word from textbox and find using the word?
-
Mar 16th, 2002, 09:51 PM
#4
New Member
hi there
only one mistake u r doing
Code:
.find "bus no = " & txtsearch.text
this will work definately.
all the best
sachin
Try......try.....and try.....don't give up.....u will suceed...all the best  
-
Mar 16th, 2002, 09:59 PM
#5
Thread Starter
Lively Member
wow it's working fine.. figuring it out the whole night
****..
one more question.. now i want to enhance it to two textbox to search..
the user can either enters something on the first textbox OR the 2nd one.. and the .find will find either one.. or both..
so how do i code the 2nd input value to the .find?
-
Mar 16th, 2002, 10:47 PM
#6
New Member
hi there,
try using AND keyword ahead of that strinf.
Code:
.find "Bus no = " & txtsearch1.text AND & txtsearch2.text
hey this is just a try.....u play with that ....definately u'll get that.
all the best
sachin
Try......try.....and try.....don't give up.....u will suceed...all the best  
-
Mar 16th, 2002, 11:55 PM
#7
Thread Starter
Lively Member
VB Code:
.Find "[Bus No] = " & txtSearch.Text Or "[Schedule No] = " & txtSearch2.Text
i did that.. and it doesnt work.. type mismatch error..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|