VB+库存管理系统+开题报告(一)毕业论文(7)
2013-05-07 18:16
导读:; Unload Me End If Text21.Visible = False Toolbar5.Buttons(1).Visible = False Toolbar5.Buttons(2).Visible = False Toolbar5.Buttons(4).Visible = False Toolbar5.Buttons(5).Visible = True Toolbar5.Button
; Unload Me
End If
Text21.Visible = False
Toolbar5.Buttons(1).Visible = False
Toolbar5.Buttons(2).Visible = False
Toolbar5.Buttons(4).Visible = False
Toolbar5.Buttons(5).Visible = True
Toolbar5.Buttons(6).Visible = True
Toolbar5.Buttons(7).Visible = False
Case 5 ''确定
On Error GoTo update_error
If Text3.Text = "" Then
MsgBox "必须填写售电员!", 0, "提示"
Exit Sub
End If
Data5.Recordset("分类") = DBCombo1.Text
Data5.UpdateRecord
Data5.Recordset.Bookmark = Data1.Recordset.LastModified
update_error:
If Err.Number = 3020 Then
MsgBox "请先添加记录! 错误:" & Err & "," & Err.Description, 0, "提示"
Unload Me
End If
Text21.Visible = True
Toolbar5.Buttons(1).Visible = True
Toolbar5.Buttons(2).Visible = True
Toolbar5.Buttons(4).Visible = True
Toolbar5.Buttons(5).Visible = False
Toolbar5.Buttons(6).Visible = False
Toolbar5.Buttons(7).Visible = True
Case 6 ''取消
On Error GoTo CanceErr
Data5.Recordset.Edit
Data5.Recordset.CancelUpdate
Text21.Visible = True
Toolbar5.Buttons(1).Visible = True
Toolbar5.Buttons(2).Visible = True
Toolbar5.Buttons(4).Visible = True
Toolbar5.Buttons(5).Visible = False
Toolbar5.Buttons(6).Visible = False
Toolbar5.Buttons(7).Visible = True
CanceErr:
If Err.Number = 3021 Then
MsgBox "没有记录! 错误:" & Err & "," & Err.Description, 0, "提示"
End If
(科教作文网http://zw.ΝsΕAc.com发布)
Case 7 ''删除
On Error GoTo del_error
a = MsgBox("真的删除吗?", vbExclamation + vbOKCancel + vbApplicationModal, "删除记录")
If a = 1 Then
Data5.Recordset.Delete
Data5.Recordset.MoveLast
End If
If a = 2 Then Exit Sub
del_error:
If Err.Number = 3426 Then
MsgBox "已经全部删除! 错误:" & Err & "," & Err.Description, 0, "提示"
Unload Me
End If
End Select
End Sub
③产品入库窗体如下:
图6-3 产品入库窗体
产品入库代码设计:
Private Sub Command1_Click()
If Val(Text1.Text) <= 0 Then
MsgBox "请输入入库数量!"
Exit Sub
End If
If DBCombo2.Text = "" Then
MsgBox "请选择入库材料名称!"
Exit Sub
End If
If DBCombo4.Text = "" Then
MsgBox "请选择经手人!"
Exit Sub
End If
Dim a As Integer
a = MsgBox("********你确定此操作吗?**********" & vbCrLf _
& "材料名称:" & DBCombo2.Text & vbCrLf _
& "原库存量:" & Label4.Caption & Label5.Caption & vbCrLf _
& "本次入库:" & Text1.Text & Label5.Caption & " 单价:" & Text2.Text & "元" & vbCrLf _
& "供应商:" & DBCombo3.Text & vbCrLf _