【正文】
Then If = Then MsgBox 請(qǐng)正確填寫(xiě)發(fā)票號(hào)碼!, vbOKOnly + vbExclamation, 信息提示 Exit Sub Else Set Myrs1 = (select * from inlib where 發(fā)票號(hào)碼=39。 amp。 Trim(Text2) amp。 39。) TableInit If = 1 Then Set Myrs2 = (select * from inlibdetail where 進(jìn)庫(kù)單號(hào)碼=39。 amp。 (進(jìn)庫(kù)單號(hào)碼) amp。 39。) Set mrc = (select * from goods where goodsid=39。 amp。 (材料編碼) amp。 39。) While = False = + 1 = 1 = 0 = (進(jìn)庫(kù)單號(hào)碼) = 1 = (發(fā)票號(hào)碼) = 2 = (進(jìn)庫(kù)日期) = 3 If IsNull((經(jīng)辦人)) Then = Else = (經(jīng)辦人) End If = 4 If IsNull((保管人)) Then = Else = (保管人) End If = 5 = (材料編碼) = 6 = (goodsname) = 7 = (type) = 8 = (unit) = 9 = (數(shù)量) = 10 = Format((單價(jià)), ) = 11 = Format((金額), ) = 12 If IsNull((備注)) Then = Else = (備注) End If Wend Else MsgBox 不存在這個(gè)發(fā)票號(hào)碼, vbOKOnly + vbExclamation, 信息提示 Text2 = Exit Sub End If End If End If If = True Then If = Then MsgBox 請(qǐng)正確填寫(xiě)材料編碼!, vbOKOnly + vbExclamation, 信息提示 Exit Sub Else Set Myrs1 = (select DISTINCT 進(jìn)庫(kù)單號(hào)碼 from inlibdetail where 材料編碼=39。 amp。 Trim(Text3) amp。 39。) TableInit If = 1 Then While = False Set mrc = (select * from inlib where 進(jìn)庫(kù)單號(hào)碼=39。 amp。 (0) amp。 39。) While = False Set Myrs2 = (select * from inlibdetail,goods where 材料編碼=39。 amp。 Trim(Text3) amp。 39。 and 進(jìn)庫(kù)單號(hào)碼=39。 amp。 (0) amp。 39。 and goodsid=材料編碼) While = False = + 1 = 1 = 0 = (進(jìn)庫(kù)單號(hào)碼) = 1 = (發(fā)票號(hào)碼) = 2 = (進(jìn)庫(kù)日期) = 3 If IsNull((經(jīng)辦人)) Then = Else = (經(jīng)辦人) End If = 4 If IsNull((保管人)) Then = Else = (保管人) End If = 5 = (材料編碼) = 6 = (goodsname) = 7 = (type) = 8 = (unit) = 9 = (數(shù)量) = 10 = Format((單價(jià)), ) = 11 = Format((金額), ) = 12 If IsNull((備注)) Then = Else = (備注) End If Wend Wend Wend Else MsgBox 不存在這個(gè)材料編碼, vbOKOnly + vbExclamation, 信息提示 Text3 = Exit Sub End If End If End If If = True Then If = Then MsgBox 請(qǐng)正確填寫(xiě)材料名稱!, vbOKOnly + vbExclamation, 信息提示 Exit Sub Else Set Myrs1 = (select * from goods where goodsname=39。 amp。 Trim(Text4) amp。 39。) TableInit If = 1 Then While = False Set mrc = (select * from inlibdetail where 材料編碼=39。 amp。 (goodsid) amp。 39。) While = False Set Myrs2 = (select * from inlib where 進(jìn)庫(kù)單號(hào)碼=39。 amp。 (進(jìn)庫(kù)單號(hào)碼) amp。 39。) While = False = + 1 = 1 = 0 = (進(jìn)庫(kù)單號(hào)碼) = 1 = (發(fā)票號(hào)碼) = 2 = (進(jìn)庫(kù)日期) = 3 If IsNull((經(jīng)辦人)) Then = Else = (經(jīng)辦人) End If = 4 If IsNull((保管人)) Then =