Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text8.Text = ""
Else
MsgBox "货物编号重复!", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Text1.Text = ""
rs_addlab1.Close
Exit Sub
End If
Frame1.Refresh
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub cun_chaxun_Click()
kucun_chaxun.Show
Unload Me
End Sub
Private Sub cun_gengxin_Click()
kucun_gengxin.Show
Unload Me
End Sub
Private Sub cun_shanchu_Click()
kucun_shanchu.Show
Unload Me
End Sub
Private Sub Form_Load()
End Sub
Private Sub kucun_baobiao_Click()
DataReport1.Show
End Sub
Private Sub ru_dengji_Click()
ruku_dengji.Show
End Sub
Private Sub Command1_Click()
Dim rs_addlab As New ADODB.Recordset
Dim sql As String
Dim sumprice As String
If Trim(Text1.Text) = "" Then
MsgBox "货物编号不能为空", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Exit Sub
End If
If Trim(Text2.Text) = "" Then
MsgBox "货物名不能为空", vbOKOnly + vbExclamation, ""
Text2.SetFocus
Exit Sub
End If
If Trim(Text3.Text) = "" Then
MsgBox "型号不能为空", vbOKOnly + vbExclamation, ""
Text3.SetFocus
Exit Sub
End If
If Trim(Text4.Text) = "" Then
MsgBox "单价不能为空", vbOKOnly + vbExclamation, ""
Text4.SetFocus
Exit Sub
End If
If Trim(Text5.Text) = "" Then
MsgBox "数量不能为空", vbOKOnly + vbExclamation, ""
Text5.SetFocus
Exit Sub
End If
sumprice = Text5.Text * Text4.Text
Text6.Text = sumprice
Text6.Refresh
If Not IsDate(Text7.Text) Then
MsgBox "请按照 yyyy-mm-dd 格式输入日期", vbOKOnly + vbExclamation, ""
Text7.SetFocus
Exit Sub
End If
If Trim(Text8.Text) = "" Then
MsgBox "备注不能为空", vbOKOnly + vbExclamation, ""
Text8.SetFocus
Exit Sub
End If
sql = "select * from 出库信息 where 货物编号='" & Text1.Text & "'"
rs_addlab.Open sql, conn, adOpenKeyset, adLockPessimistic
If rs_addlab.EOF Then
rs_addlab.AddNew
rs_addlab.Fields(0) = Trim(Text1.Text)
rs_addlab.Fields(1) = Trim(Text2.Text)
rs_addlab.Fields(2) = Trim(Text3.Text)
rs_addlab.Fields(3) = Trim(Text4.Text)
rs_addlab.Fields(4) = Trim(Text5.Text)
rs_addlab.Fields(5) = Trim(Text6.Text)
rs_addlab.Fields(6) = Trim(Text7.Text)
rs_addlab.Fields(7) = Trim(Text8.Text)
rs_addlab.Update
MsgBox "出库登记成功", vbOKOnly + vbInformation, "完成"
rs_addlab.Close
Else
MsgBox "货物编号重复!", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Text1.Text = ""
rs_addlab.Close
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub cun_chaxun_Click()
kucun_chaxun.Show
Unload Me
End Sub
Private Sub cun_gengxin_Click()
kucun_gengxin.Show
Unload Me
End Sub
Private Sub cun_shanchu_Click()
kucun_shanchu.Show
Unload Me
End Sub
Private Sub Form_Load()
End Sub
Private Sub ru_dengji_Click()
ruku_dengji.Show
Unload Me
End Sub
Private Sub chu_dengji_Click()
chuku_dengji.Show
End Sub
rivate Sub cun_chaxun_Click()
kucun_chaxun.Show
需要完整内容的请联系QQ752018766,本文免费,转发请注明源于www.751com.cn
kucun_shanchu.Show
Unload Me
End Sub
Private Sub Label5_Click()
End Sub
Private Sub Form_Load()
End Sub
Private Sub ru_dengji_Click()
ruku_dengji.Show
Unload Me
End Sub
Private Sub chu_dengji_Click()
chuku_dengji.Show
Unload Me
End Sub
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页