Hi!
I'm using VS 2003 and MS Access. I have this Form1 that displays Record details on textboxes (they are databinded).. The records are retrieved from MS Access using the code:
Public Sub loadFund()
'[Load Items]
Dim selectAllSQL as string = "SELECT * FROM Table1"
Dim selectAllCMD As OleDbCommand = New OleDbCommand(selectAllSQL, theConnection)
theAdapter.SelectCommand = selectAllCMD
theData = New DataSet
theAdapter.Fill(theData, "Table1")
'[Load Items /]
End Sub
I have a search function that will show a datagrid on the lower part of the form. So far I was able to filter searches using this code.
Dim dv As New DataView(theData.Tables("Table1"))
dv.RowFilter = "itmAmt = " & "'" & txtSearch.Text & "'"
DataGrid1.DataSource = dv
The filter works fine, but I have one problem. The main form (that contains the record details)does not navigate along when I navigate thru the datagrid. I want to be able to do that. So when the user finds what he's looking for from the filtered results, he could just double click on the datagrid row and the row that was double clicked would show on the main form so he could edit it or something using the main form. How is this possible? Please help me, its driving me crazy. :(