rs.Delete
            rs.Update
            MsgBox "删除成功", 64, "信息提示"
        End If
    End If
End Sub
Private Sub Command4_Click()
        str1 = "select * from 设备消耗登记表 where 编号='" & Text1.Text & "'"
    If rs.State = 1 Then
        rs.Close
    End If
    rs.Open str1, cn, 1, 3
        Text1.Text = rs("编号")
        Text2.Text = rs("设备名称")
        Text3.Text = rs("设备编号")
        Text4.Text = rs("设备数量")
        Text5.Text = rs("登记人")
        Text6.Text = rs("使用部门")
        Text7.Text = rs("报废日期")
        Text8.Text = rs("报废原因")
        c = MsgBox("您确认要修改该记录吗?", 32 + 4, "特别提示")
        If c = vbYes Then
        rs.Update
      End If
     End Sub
Private Sub Command5_Click()
    str1 = "select * from 设备消耗登记表 where 编号='" & Text1.Text & "'"
    If rs.State = 1 Then
        rs.Close
    End If
    rs.Open str1, cn, 1, 3
        rs("编号") = Text1.Text
        rs("设备名称") = Text2.Text
        rs("设备编号") = Text3.Text
        rs("设备数量") = Text4.Text
        rs("登记人") = Text5.Text
        rs("使用部门") = Text6.Text
        rs("报废日期") = Text7.Text
        rs("报废原因") = Text8.Text
        rs.Update
        MsgBox "数据修改成功", 64, "信息提示"
    End Sub
Private Sub Command6_Click()
    主界面.Show
    cn.Close
    Unload Me
End Sub

领用查询:
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Form_Load()
    If cn.State = 1 Then
        cn.Close
    End If
    cn.connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\设备管理系统.mdb " & "Persist Security Info=False"
    cn.Open
End Sub
Private Sub command1_Click()
    str1 = "select * from 设备领用登记表where 编号='" & Text1.Text & "'"
    If rs.State = 1 Then
上一篇:《计算机网络》课程通用题库管理系统设计与实现
下一篇:C#公司考勤管理系统的设计实现+流程图+ER图

Android全国天气移动终端应用程序设计研究

jsp+mysql网上化肥店系统的设计与开发

java的B2C型电子商务网站管理系统的设计

基于MOODLE平台的在线交互式学习设计

152mm口径榴弹炮内弹道数据库设计

局域网管理系统的设计与实现

Wireshark的P2P文件共享中的行为提取软件设计

弹道修正弹实测弹道气象数据使用方法研究

紫陵阁

人事管理系统开题报告

淮安市老漂族心理与休闲体育现状的研究

适合宝妈开的实体店,适...

浅谈动画短片《天降好运》中的剧本创作

组态王文献综述

小学《道德与法治》学习心得体会

林业机械作业中的安全性问题【2230字】

大学生就业方向与专业关系的研究