程序代码:
Private Sub Image2_Click()
Image2.Picture = Form2.Image37.Picture
If Combo1.Text = "" Or Combo2.Text = "" Or Combo3.Text = "" Or Combo4.Text = "" Or Combo5.Text = "" Then
Image4.Visible = True
Image4.Picture = Form2.Image49.Picture
Exit Sub
End If
If Combo1.Text <> "" And Combo2.Text <> "" And Combo3.Text <> "" And Combo4.Text <> "" And Combo5.Text <> "" Then
'往ACCESS数据库中插入信息代码
Call KKK(conn)
RS.Open "select * from 数据 '", conn, 3, 2
RS.AddNew
RS!设备编号 = Trim(Combo1.Text)
RS!抽屉台车号 = Trim(Combo2.Text)
RS!坏点位置 = Trim(Combo3.Text)
RS!坏点现象 = Trim(Combo4.Text)
RS!确认状态 = Trim(Combo5.Text)
RS!提交人员 = Trim(Label1.Caption)
RS!权限 = Trim(Label2.Caption)
RS!班次 = Trim(Label3.Caption)
RS!所属 = Trim(Label4.Caption)
RS!提交日期 = Trim(Label5.Caption)
RS!提交时间 = Trim(Label6.Caption)
Image4.Visible = True
Image4.Picture = Form2.Image48.Picture
RS.Update
RS.Close
conn.Close
Set RS = Nothing
Set conn = Nothing
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Combo5.Text = ""
Combo1.SetFocus
Exit Sub
End If
MSFlexGrid1.Clear
MSFlexGrid1.Visible = True
With MSFlexGrid1
.Cols = 12
.Rows = 1
.TextMatrix(0, 0) = Space(3) & "序号"
.TextMatrix(0, 1) = Space(6) & "设备编号"
.TextMatrix(0, 2) = Space(6) & "抽屉台车号"
.TextMatrix(0, 3) = Space(6) & "坏点位置"
.TextMatrix(0, 4) = Space(6) & "坏点现象"
.TextMatrix(0, 5) = Space(6) & "确认状态"
.TextMatrix(0, 6) = Space(6) & "提交人员"
.TextMatrix(0, 7) = Space(3) & "权限"
.TextMatrix(0, 8) = Space(3) & "班次"
.TextMatrix(0, 9) = Space(3) & "所属"
.TextMatrix(0, 10) = Space(6) & "提交日期"
.TextMatrix(0, 11) = Space(6) & "提交时间"
.ColWidth(0) = 800
.ColWidth(1) = 1500
.ColWidth(2) = 1500
.ColWidth(3) = 1500
.ColWidth(4) = 1500
.ColWidth(5) = 1500
.ColWidth(6) = 1500
.ColWidth(7) = 1000
.ColWidth(8) = 1000
.ColWidth(9) = 1000
.ColWidth(10) = 1500
.ColWidth(11) = 1500
End With
End Sub
以上代码中,怎么追加让MSFlexgrid控件显示ACCESS数据库中已有的信息,