CooterBrown
IS-IT--Management
I am building a datagrid from a table we have on our midrange system. The grid is loading fine but what I want to do is depending on the row that is clicked populate a few text boxes with a couple of feilds in the table. how can I do that?
Private Sub Form_Load()
'On Error GoTo ErrorHandler
Dim Connection As New ADODB.Connection
Dim Records As New ADODB.Recordset
'important against as400
Connection.ConnectionString = "Provider=IBMDA400.DataSource.1;User ID=;Data Source=System;Transport Product=Client Access;SSL=DEFAULT"
Connection.CursorLocation = adUseClient
Connection.Open
Records.Open "SELECT * FROM Table", Connection, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = Records
Form1.Show
End Sub
Private Sub Form_Load()
'On Error GoTo ErrorHandler
Dim Connection As New ADODB.Connection
Dim Records As New ADODB.Recordset
'important against as400
Connection.ConnectionString = "Provider=IBMDA400.DataSource.1;User ID=;Data Source=System;Transport Product=Client Access;SSL=DEFAULT"
Connection.CursorLocation = adUseClient
Connection.Open
Records.Open "SELECT * FROM Table", Connection, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = Records
Form1.Show
End Sub