Call Rebind
'add all cp in the table carWX
Set adors = adoCon.Execute("select distinct 车牌号码 from 车辆维修表")
On Error Resume Next
Do
cmcp.AddItem adors.Fields(0)
adors.MoveNext
Loop Until adors.EOF
adors.Close
End Sub
Private Sub Rebind()
Frame2.Caption = "车辆维修列表"
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from 车辆维修表"
Adodc1.Refresh
End Sub
Private Sub QingKong()
Frame2.Caption = "您所要查询的车辆维修记录如下:"
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from 车辆维修表 where 1=0"
Adodc1.Refresh
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
cmdExit_Click
End Sub