Public Function Supervisor_Search(Grid As MSHFlexGrid, Field As String, KeyWord As String)
SQL = "select * from tblSupervisor where " & Field & " like '" & KeyWord & "%' order by Supervisor_Lastname"
rs.Open SQL, conn
Set Grid.DataSource = rs
rs.Close
End Function
the Field is the Field in your database, and the keyword are the one's you input in your text box. Hope it helps...
|