Private Sub Command4_Click() '取消
Call clearzore
Text1(0).SetFocus
End Sub
Private Sub Command5_Click() '返回
Unload Me
End Sub
Private Sub command6_Click() '出库材料的查询
'---------------------判断出库查询输入的数据--------------
If Trim(Text1(11).Text) = "" Or Trim(Text1(12).Text) = "" Then '当要补充出库的信息时
MsgBox ("品名与规格不能为空!")
Text1(11).SetFocus
Exit Sub
End If
Call list2disp
Command1.Enabled = False
'-------------------------------------------------
End Sub
Private Sub Form_Load()
Me.Top = (Mainform.Height - Me.Height) / 2 - 800
Me.Left = (Mainform.Width - Me.Width) / 2
Me.Caption = "仓库管理系统→" & "入库操作"
instorehouse.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Storehouse.mdb;Persist Security Info=False"
outstorehouse.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Storehouse.mdb;Persist Security Info=False"
person.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Storehouse.mdb;Persist Security Info=False"
stock.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Storehouse.mdb;Persist Security Info=False"
Call clearzore
Call option1def
Call list2def
Call list1def
Call list1disp
Text1(6).Text = Date
Text1(9).Text = Operater1
Command1.Enabled = False
End Sub
Private Sub list2_Click()
row1 = list2.Row '返回单击的行值
If row1 <> 0 Then
Command1.Enabled = True
End If
outstorehouse.RecordSource = "select * from outstorehouse where 编号=" + list2.TextMatrix(row1, 4)
outstorehouse.Refresh
If outstorehouse.Recordset.EOF = False Then '此if 为了判断LIST1中是否有数据
Frame6.Enabled = True
With outstorehouse.Recordset
If IsNull(.Fields(8)) = True Then
Text1(13).Text = ""
Else
Text1(13).Text = .Fields(8)
End If
If IsNull(.Fields(9)) = True Then
Text1(14).Text = ""
Else
Text1(14).Text = .Fields(9)
End If
If IsNull(.Fields(10)) = True Then
Text1(15).Text = ""
Else
Text1(15).Text = .Fields(10)
End If
If IsNull(.Fields(11)) = True Then
Text1(16).Text = ""
Else
Text1(16).Text = .Fields(11)
End If
End With
Else
Frame6.Enabled = False
End If
End Sub
Private Sub Option1_Click()
rk = "初次入库"
Call option1def
End Sub
Private Sub Option2_Click()
rk = "余料入库"
Command1.Enabled = False
Call option2def
list2.Enabled = False '一开始就屏蔽list2的单击事件
End Sub
Private Sub Text1_GotFocus(Index As Integer)
www.youerw.com
person.RecordSource = "select * from person where 编号 = '" + Trim(Text1(7)) + "'"
person.Refresh
If person.Recordset.EOF Then
MsgBox ("库中无此人,请重新输入编号!")
Text1(7).Text = ""
Text1(8).Text = ""
'Text1(7).SetFocus
Else
Text1(8).Text = person.Recordset.Fields(1)
End If
End If
End Sub
Private Sub list2def() '将list2的表头初始化
list2.TextMatrix(0, 0) = "品名"
list2.TextMatrix(0, 1) = "规格"
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页