【正文】
Private Sub txtliang_LostFocus() End Sub Beep KeyAscii = 0 And KeyAscii Asc(.) Then If (KeyAscii 48 Or KeyAscii 57) And KeyAscii = 32 _ Private Sub txtliang_KeyPress(KeyAscii As Integer) End Sub End With .SelLength = Len(.Text) .SelStart = 0 With txtliang Private Sub txtliang_GotFocus() End Sub End If Beep KeyAscii = 0 And KeyAscii Asc(.) Then If (KeyAscii 48 Or KeyAscii 57) And KeyAscii = 32 _只能輸入數(shù)字 39。 Call addywy添加廠家名稱 39。 End With.RecordSource = 進(jìn)貨記錄 39。 End If End With .Update .Fields(數(shù)量).Value = txtliang_value .Fields(商品名稱).Value = jhna .Fields(商品編號(hào)).Value = jhbh .AddNew With 添加新記錄 39。 = = = = = = 必須初始化綁定字段 Else 39。 If zxh = True Then Call notnull jhna = jhbh = txtliang_value = On Error GoTo err = False = False = True Dim jhbh$, ccbh$, jhna$ Dim field_value$, txtliang_value$ Private Sub cmdsave_Click() End Sub = False = False = True Private Sub cmdcancel_Click() End Sub = False = True = True = Date Private Sub cmdaddnew_Click() End Sub End If MsgBox 數(shù)量不能為空, vbInformation, 試圖添加空記錄 zxh = True If = Then End If MsgBox 商品名稱不能為空, vbInformation, 試圖添加空記錄 zxh = True If = Then End If MsgBox 商品編號(hào)不能為空, vbInformation, 試圖添加空記錄 zxh = True If = Then Private Sub notnull() End Sub Set db = Nothing Set rs = Nothing Wend (廠家名稱).Value While Not Set rs = (廠家) ) Set db = OpenDatabase( amp。 Dim rs As Recordset Dim db As Database為bobox控件添加內(nèi)容 Dim zxh As Boolean 39。 代碼: caption屬性分別為:新單、保存、取消、退出 datasource屬性分別為:data1,datafield為空。 txtname(商品名稱)、txtliang(數(shù)量)、txtdanjia(單價(jià))、txtbianhao(商品編號(hào))、txtjhdata(操作日期)、txtjine(金額)、txtjine(金額)、txtshuiq(稅前金額)、txtshui(稅率) (1)TextBox:本模塊共用8個(gè)文本框,其Name屬性分別為: frmjhgl(進(jìn)貨管理)模塊中所有控件的相關(guān)設(shè)置: 此模塊的技術(shù)關(guān)鍵是在保存記錄上,在為“銷售記錄”表中存數(shù)據(jù)時(shí)應(yīng)同時(shí)向“庫存記錄”表添加,如果有此商品則在原有的基礎(chǔ)上進(jìn)行加法運(yùn)算,否則添加新記錄。 一:進(jìn)貨管理 Col15=備注 Char Width 20 Col14=忠誠度 Char Width 10 Col13=愛好 Char Width 10 Col12=生日 Date Col11=婚否 Bit Col10=Email Char Width 20 Col9=家庭住址 Char Width 40 Col8=個(gè)人電話 Char Width 20 Col7=身份證號(hào)碼 Char Width 40 Col6=上工時(shí)間 Char Width 20 Col5=工種 Char Width 10 Col4=所屬部門 Char Width 20 Col3=姓別 Char Width 2 Col2=姓名 Char Width 8 Col1=編號(hào) Char Width 10 [員工檔案] Col7=備注 Char Width 20 Col6=身份證號(hào)碼 Char Width 40 Col5=家庭住址 Char Width 20 Col4=個(gè)人電話 Char Width 20 Col3=所屬部門 Char Width 20 Col2=姓名 Char