【正文】
If = Then Exit Sub Else c = MsgBox(您確認要刪除該記錄嗎?, 17, 提示!) If c = vbOK Then Call Main Set adoRs = (delete from dzjstb where 讀者編號=39。 + + 39。) End If End If Else MsgBox 當前數(shù)據(jù)庫中已經(jīng)沒有可刪除的記錄, 64, 提示! End IfEnd Sub 丟失管理模塊圖書丟失管理模塊主要功能是記錄圖示的丟失信息。并且能對丟失圖書的信息進行查詢。.(3)。技術(shù)分析:利用ComboBoxko控件提供不同的選項供選擇。用AddItem方法將供選擇的項目添加到ComBox控件中。 .(3) 圖書丟失管理(1) 通過觸發(fā)Text的LostFocus事件,開始查詢讀者和借書信息。Private Sub Text2_LostFocus() If = Or = Then MsgBox 請輸入條碼號和讀者編號, vbInformation, 提示! Exit Sub Else = select * from dzjstb where 條碼號=39。 amp。 amp。 39。and 讀者編號=39。 + + 39。 If 0 Then = (0) = (1) = (4) = (8) = (3) = (9) = (10) Else MsgBox 沒有此讀者的借書信息, vbOKOnly, 提示! = = End If End IfEnd Sub(2) 記錄丟失信息到圖書丟失表,同時修改Book表和讀者借書表的相應(yīng)字段。Private Sub Command2_Click() c = MsgBox(確認該圖書丟失了嗎?, 33, 提示!) If c = vbOK Then Dim sql, sql1 As String Dim sql2 As Integer sql = insert into pstb values(39。 amp。 Text1 amp。 39。,39。 amp。 Text2 amp。 39。,39。 amp。 DTPicker1 amp。 39。,39。 amp。 Text3 amp。 39。,39。 amp。 Label8 amp。 39。,39。 amp。 Label9 amp。 39。,39。 amp。 Label10 amp。 39。,39。 amp。 Label14 amp。 39。,39。 amp。 Label15 amp。 39。,39。 amp。 Label16 amp。 39。,39。 amp。 Label17 amp。 39。) (sql) = select * from books where 條碼號=39。 amp。 amp。 39。 If 0 Then sql1 = update books set 復(fù)本數(shù)=39。 amp。 復(fù)本數(shù) Val() amp。 39。 where 條碼號=39。 amp。 amp。 39。 (sql1) sql2 = Val() Val() sql1 = update dzjstb set 借書數(shù)量=39。 amp。 sql2 amp。 39。 where 讀者編號=39。 amp。 amp。 39。 (sql1) End If End If = select * from pstb End Sub(3) 查詢丟失的圖書信息。Private Sub Command4_Click() If = Or = Or = Then MsgBox 請輸入或選擇查詢條件!, vbInformation, 提示! Else If i = 1 Then = select * from pstb where + + like 39。% + + %39。 ElseIf i = 0 Then = select * from pstb where + + + + 39。 + + 39。 End If End IfEnd Sub 庫存圖書檢索庫存圖書檢索為用戶提供了庫存圖書的檢索功能。該模塊通過TreeView控件和DataGrid控件為用戶提供直觀庫存圖書信息。.(4)。.(4) 庫存圖書檢索技術(shù)分析:當單擊TreeView中的節(jié)點時,DataGrid中顯示對應(yīng)分類圖書的信息。單擊子節(jié)點時窗體右邊顯示詳細的圖書信息。通過自定義的菜單能夠?qū)崿F(xiàn)對TreeView中節(jié)點的操作。(1) 自定義Tree_Change過程同Main框體。(2) 通過節(jié)點單擊事件在DataGrid控件中顯示分類信息。Private Sub TreeView1_NodeClick(ByVal Node As ) Dim temp As String Dim Tree_Node As String Dim rstemp As New Tree_Node = If Tree_Node = 圖書分類 Then = select * from View_tsfl Else = select * from View_tsfl where 書籍類別=39。 + Tree_Node + 39。 = select * from View_tsfl where 書籍類別=39。 + Tree_Node + 39。 If 0 Then ElseIf = 0 Then = select * from View_tsfl where 書籍名稱=39。 + Tree_Node + 39。 = select * from View_tsfl where 書籍名稱=39。 + Tree_Node + 39。 If 0 Then temp = (書籍類別) = select * from View_tsfl where 書籍類別=39。 + temp + 39。