Option Explicit
private Sub Command1_click()
Data1.Recordset.AddNew. '添加新记录
End Sub
Private Sub Command2_Click()
Data1.UpdateRecord '添加记录后更新
Data1.Recordset.Bookmark=Data Recordset_Last Modified
End Sub
Private Sub Command3_Click
Dim msg As string '删除记录
msg="是否确定要删除记录"&Chr$(10)
msg=msg&Text1.Text
IfMsgBox(msg,17,"删除记录?")<>1 Then Exit sub
on Error Go To Handle
Data1.Recordset.MoveNext
If Data1.Recordset.EOFThen Date1.Recordset.MovePrevious
Handle:
Msg Box"该记录不能删除!!" '原记录不能被删除
End sub
Private Sub Commond_Click()
Dim msgfind As string '查找记录
msgfind=Input Box("请输入要查找的公司名:","查找记录"
If msgfind<>""Then data1.Recordset.FindFirst("[companyName]=msgfind"
End Sub
private Sub Command5_Click()
End
End Sub
生命理应追求阳光