某一条记录:'保持数据一致性
Private Sub DataGrid1_Click()
DataGrid1.Refresh
If Adodc1.Recordset.EOF Then
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "库中没有记录。"
Exit Sub
End If
Adodc1.Recordset.MoveFirst
End If
Text3.Visible = False
Label4.Visible = True
Text1.Text = Adodc1.Recordset(0)
Text2.Text = Adodc1.Recordset(1)
End Sub
Private Sub grdDataGrid_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
'If Not Adodc1.Recordset.EOF And Not Adodc1.Recordset.BOF Then
grdDataGrid.row = 8
Text3.Text = grdDataGrid.Columns(0)
'End If
End Sub