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?
Printable View
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?
Are you ultimatly going to use that to retrieve a record
from a DataBase?
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?
hi there
only one mistake u r doing
this will work definately.Code:.find "bus no = " & txtsearch.text
all the best
sachin
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?
hi there,
try using AND keyword ahead of that strinf.
hey this is just a try.....u play with that ....definately u'll get that.Code:.find "Bus no = " & txtsearch1.text AND & txtsearch2.text
all the best
sachin
VB Code:
.Find "[Bus No] = " & txtSearch.Text Or "[Schedule No] = " & txtSearch2.Text
i did that.. and it doesnt work.. type mismatch error..