【正文】
Down(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub frm_temp 源代碼 _Private Sub Command1_Click() = = = select * from newtb where 訂單號 =39。 If 0 Then = select * from rkb where 訂單號 =39。 If 0 Then MsgBox 該訂單已經(jīng)入庫 ,不能夠再進行入庫操作 ,請輸入其他的入庫訂單號 , vbInformation Else str = = 0 = 2 1 = 驗收入庫 = Val((訂購價格 )) * Val((復(fù)本數(shù) )) End If Else MsgBox 沒有此訂單號的信息 ,請您確認(rèn)后重新輸入 , 32 = End If End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Command1_Click End If End Sub 交通運輸學(xué)院課程設(shè)計 42 frmdzjsgl 源代碼 Private Sub Form_Activate() = Date End Sub Private Sub Form_Load() = = = = select * from dzjstb where 借 =39。 = amp。 (2).Text End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then = select * from dzxxtb where 讀者編號 =39。 amp。 If 0 Then = (1) Else MsgBox 沒有該讀者信息! , vbOKOnly = End If End If End Sub Private Sub Text1_LostFocus() If = Then MsgBox 請輸入讀者編號! Exit Sub End If End Sub Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub 交通運輸學(xué)院課程設(shè)計 43 Private Sub Text3_LostFocus() = select * from books where 條碼號 =39。 amp。 On Error Resume Next If 0 Then = (書籍名稱 ) = (訂購價格 ) = (規(guī)定天數(shù) ) = (出版社 ) = (作者 ) = (類別代碼 ) = + Val() Else MsgBox 沒有該書籍信息! , vbOKOnly = = = = = = = End If Set rs = Nothing End Sub Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub text5_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub 交通運輸學(xué)院課程設(shè)計 44 Private Sub Text9_LostFocus() If = Then MsgBox 借書數(shù)量不能為空 !, vbInformation Else = select * from sz If 0 Then If Val() Val((0)) Then MsgBox 借書數(shù)量大于系統(tǒng)所規(guī)定的借出數(shù)量 ,請您查看系統(tǒng)管理當(dāng)中的系統(tǒng)設(shè)置后再重新輸入借書數(shù)量的信息 , vbOKOnly = End If End If End If End Sub Frmdzhsgl 源代碼 Dim rs As Private Sub Command1_Click() Dim hs, js, i As String Dim hs1, sz1 As String Dim x, y, z As Integer If = Or = Then MsgBox 請輸入讀者編號和條碼號 , vbInformation Else i = MsgBox(確認(rèn)歸還該圖書嗎! , vbYesNo + vbOKOnly) If i = vbYes Then Set rs = (insert into hsstb values( amp。 , amp。 ,39。 Text3 amp。, amp。 ,39。 Text6 amp。,39。 Text7 amp。, amp。 ,39。 DTPicker1 amp。,39。 DTPicker2 amp。, amp。 ,39。 DTPicker3 amp。, amp。 )) = select * from hsstb = select * from books where 條碼號 =39。 amp。 If 0 Then = select * from dzjstb where 條碼號 =39。 amp。 and 讀者編號 =39。 交通運輸學(xué)院課程設(shè)計 45 If 0 Then x = Val(( 復(fù) 本 數(shù) )) + Val((借書數(shù)量 )) y = Val(( 借書數(shù)量 )) Val((借書數(shù)量 )) hs1 = update books set 復(fù)本數(shù) =39。 x amp。,借書數(shù)量 =39。 y amp。where 條碼號 =39。 amp。 (hs1) End If End If js = update dzjstb set 借 =39。,借書數(shù)量 =39。 where 條碼號 =39。 amp。 (js) MsgBox 還書成功! , vbOKOnly Else On Error Resume Next End If End If End Sub Private Sub Command3_Click() Unload Me End Sub Private Sub DTPicker3_Change() = If = Then = 0 Else = End If End Sub Private Sub Form_Load() = = select * from hsstb = = set rs = New select * from hsstb, n, adOpenStatic, adLockOptimistic = amp。 (2).Text = select * from dzjstb where 借 =39。 交通運輸學(xué)院課程設(shè)計 46 = Date End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then If = Then MsgBox 輸入不能為空 !, vbCritical Else = True End If End If End Sub Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then End Sub Private Sub Text1_LostFocus() = select * from dzjstb where 條碼號 =39。 amp。and 讀者編號 =39。 and 借 =39。 On Error Resume Next If 0 Then = (0) = (3) = (1) = (4) = (6) = (7) = (5) = (10) = (11) = If = Then = 0 Else