VB实现ACCESS数据库记录的查询,新增,删除,修改的代码是什么?

“修改”按钮的程序 \x0d\Private Sub cmdEdit_Click() \x0d\sql = "select * from 停时统计 where date = cdate('" & Text8.Text & "') and ycqk = '" & Combo1.Text & "'and id = '" & DataGrid1.Columns(2).CellText(DataGrid1.Bookmark) & "'" \x0d\rs.Open sql, dm, adOpenDynamic, adLockOptimistic \x0d\rs.Fields("id") = Text7.Text \x0d\rs.Fields("ycqk") = Combo1.Text \x0d\rs.Fields("date1") = Text1.Text \x0d\rs.Fields("time1") = Text2.Text \x0d\rs.Fields("date2") = Text3.Text \x0d\rs.Fields("time2") = Text4.Text \x0d\rs.Update \x0d\rs.Close \x0d\End Sub \x0d\\x0d\'“删除”按钮的程序 \x0d\Private Sub cmdDelete_Click() \x0d\strFCode = DataGrid1.Columns(0).CellText(DataGrid1.Bookmark) \x0d\strSCode = DataGrid1.Columns(2).CellText(DataGrid1.Bookmark) \x0d\strCCode = DataGrid1.Columns(1).CellText(DataGrid1.Bookmark) \x0d\sql = "select * from 停时统计 where date='" & strFCode & "' and id='" & strSCode & "' and ycqk='" & strCCode & "'" \x0d\rs.Open sql, dm, adOpenDynamic, adLockOptimistic \x0d\rs.Delete \x0d\rs.Update \x0d\rs.Close \x0d\End Sub \x0d\\x0d\'“增加”按钮的程序 \x0d\Private Sub Command1_Click() \x0d\sql = "select * from 停时统计 order by id" \x0d\rs.Open sql, dm, adOpenDynamic, adLockOptimistic \x0d\rs.AddNew \x0d\rs.Fields("date") = Date \x0d\rs.Fields("id") = Text7.Text - 1 \x0d\rs.Fields("ycqk") = Combo1.Text \x0d\rs.Fields("date1") = Text1.Text \x0d\rs.Fields("time1") = Text2.Text \x0d\rs.Fields("date2") = Text3.Text \x0d\rs.Fields("time2") = Text4.Text \x0d\rs.Update \x0d\rs.Close \x0d\\x0d\With Adodc1 \x0d\Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Persist Security Info=False" \x0d\Adodc1.RecordSource = "select * from 停时统计 where date = cdate('" & Text8.Text & "') and ycqk = '" & Combo1.Text & "' order by id" \x0d\Adodc1.Refresh \x0d\DataGrid1.Refresh \x0d\End With \x0d\End Sub