msgrid 选择若干记录的方法:
Private Sub MSHFlexGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
cellstart = MSHFlexGrid1.Row
End Sub
Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
cellstop = MSHFlexGrid1.RowSel
Call sel_boyong
End Sub
Sub sel_boyong()
Dim i, j
For j = cellstart To cellstop
MSHFlexGrid1.Row = j
If MSHFlexGrid1.CellBackColor = RGB(255, 200, 255) Then
For i = 0 To MSHFlexGrid1.Cols - 1
MSHFlexGrid1.Col = i
MSHFlexGrid1.CellBackColor = RGB(255, 255, 255)
Next
Else
For i = 0 To MSHFlexGrid1.Cols - 1
MSHFlexGrid1.Col = i
MSHFlexGrid1.CellBackColor = RGB(255, 200, 255)
Next
End If
Next
Public Rs As New ADODB.Recordset
Public adoRs As New ADODB.Recordset
Public Conn As New ADODB.Connection
Dim i As Integer
Dim j As Integer
Public Sub Make_Connection()
Dim strConn As String
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\桌面\TEST!\People.mdb;Persist Security Info=False"