Hi All,
i am trying to write a simple search screen, 1 text box, 1 datagrid and a search button with a datafilter.
VB Code:
Dim sn As String sn = txtSurname.Text Dim dvCFilter As New DataView(objdsCSearch.Tables("CDetails"), _ "Surname = '& sn &'", _ "DOB", _ DataViewRowState.CurrentRows) grdCDetails.DataSource = dvFilter
This works if i change ' & sn & ' to an actual surname but i need to be able to search by the name entered into the text box.
Should i be using dataview to filter?
Cheers




Reply With Quote