消耗报表.Show
Unload Me
End Sub
Private Sub基本信息汇总_Click()
设备基本信息报表.Show
Unload Me
End Sub
Private Sub 领用情况_Click()
领用查询.Show
Unload Me
End Sub
Private Sub 退出_Click()
Unload Me
End Sub
Private Sub 消耗登记_Click()
设备消耗登记.Show
Unload Me
End Sub
Private Sub Ï消耗情况_Click()
消耗查询.Show
Unload Me
End Sub
Private Sub 修改密码_Click()
改密码.Show
Unload Me
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
设备基本信息.Show
Unload Me
Case 2
设备领用登记.Show
Unload Me
Case 3
设备消耗登记.Show
Unload Me
Case 4
Unload Me
End Select
End Sub
修改密码:
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 登录界面 where 用户名='" & Text1.Text & "'"
If Text4.Text = Text3.Text Then
Adodc1.Recordset.Fields("密码") = Text3.Text
MsgBox "密码修改成功!", vbInformation
Adodc1.Recordset.Update
主界面.Show
Unload Me
Else
MsgBox "两次密码不相同,请输入新密码!", vbInformation
End If
End Sub
Private Sub Command2_Click()
主界面.Show
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
rs.Close
End If
rs.Open str1, cn, 1, 3
If rs.EOF Then
MsgBox "不存在该设备"
Else
Text1.Text = rs("编号")
Text2.Text = rs("设备名称")
Text3.Text = rs("设备编号")
Text4.Text = rs("设备单价")
Text5.Text = rs("设备数量") VB设备管理系统设计+需求分析+可行性分析(16):http://www.751com.cn/jisuanji/lunwen_192.html