【正文】
End If Else strcon(6) = End If For x = 1 To 6 If strcon(x) Then findsql = findsql + strcon(x) End If Next x = adUseClient = adCmdText = findsql If 0 Then = True = True Else MsgBox 對不起館內(nèi)沒有你所查詢的書籍,請核對后再查詢! , vbInformation + vbOKOnly, 提示 OptionV = End If End Sub Private Sub Command2_Click() OptionV = End Sub Private Sub Command3_Click() If = False Then MsgBox 對不起,你的權(quán)限不夠,不能進(jìn)行修改操作! , vbInformation + vbOKOnly, 信息 Exit Sub Else End If End Sub Private Sub Command4_Click() Dim BookID As String Dim lent As String If = False Then MsgBox 對不起 ,你的權(quán)限不夠,不能進(jìn)行刪除操作! , vbInformation + vbOKOnly, 信息 Exit Sub Else = 0 BookID = If MsgBox(你確定要刪除編號為 + BookID + _ 的書籍信息嗎? , vbInformation + vbOKCancel, 刪除 ) = vbOK Then = 8 lent = If lent = 1 Then If MsgBox(此書尚未還回館內(nèi),你是否繼續(xù)刪除操作? , vbInformation + vbOKCancel, 提示 ) = vbOK Then With .Delete If Not .EOF Then .MoveNext Else .MoveLast End If End With MsgBox 編號為 + BookID + 的書籍信息已經(jīng)刪除! , vbInformation + vbOKOnly, 提示 Exit Sub Else Exit Sub End If End If With .Delete 。 amp。 Else strcon(6) = 登記日期 like 39。 End If Else strcon(5) = End If If = True Then If = 0 Then strcon(6) = 登記日期 = amp。 amp。 Else strcon(5) = 作者姓名 like39。 amp。 End If Else strcon(4) = End If If = True Then If = 0 Then strcon(5) = 作者姓名 =39。 amp。 Else strcon(4) = 出版社 like39。 amp。 End If Else strcon(3) = End If If = True Then If = 0 Then strcon(4) = 出版社 =39。 amp。 Else strcon(3) = 類別代碼 like 39。 amp。 End If Else strcon(2) = End If If = True Then If = 0 Then strcon(3) = 類別代碼 =39。 amp。 Else strcon(2) = 書籍名稱 like 39。 amp。 End If Else strcon(1) = End If If = True Then If = 0 Then strcon(2) = 書籍名稱 =39。 amp。 Else strcon(1) = 書籍編號 like 39。 amp。 and bookinfo.類別代碼 = and 還書日期 is null Set g_rs = (g_strsql) If Not Then = g_rs!書籍名稱 = g_rs!讀者編號 = g_rs!書籍類別 = g_rs!書籍頁碼 = g_rs!讀者姓名 = g_rs!借書日期 = g_rs!借出天數(shù) = Date = CStr(Date g_rs!借書日期 ) If CInt() CInt() 0 Then = CStr(CInt() CInt()) Else = 0 End If Set g_rs = Nothing Set g_rs = (select * from setinfo) = g_rs!罰款 * CInt() Set g_rs = Nothing = True Else Set g_rs = Nothing MsgBox 沒有該圖書信息或該圖書尚未借出,請返回! , vbInformation + vbOKOnly, 信息 = = = = = = = = = = = = End If ElseIf keyascii = 13 And = Then MsgBox 請輸入需要返還的圖書編號! , vbInformation + vbOKOnly, 信息 End If End Sub 查找圖書窗體 Private Sub Command1_Click() Dim findsql As String Dim strcon(6) As String Dim x As Integer findsql = select * from bookinfo where If = False And = False And = False And _ = False And = False And = False Then MsgBox 請選擇查詢方式 , vbInformation + vbOKOnly, 警告 = True Exit Sub End If If = Then MsgBox 請?zhí)?寫查詢內(nèi)容! , vbInformation + vbOKOnly, 警告 Exit Sub End If If = True Then If = 0 Then strcon(1) = 書籍編號 =39。 amp。 and =39。 from bookinfo,readerinfo,booktype,lentinfo _ amp。 , , ,lentinfo.借書日期 , _ amp。 39。 amp。 amp。 _ amp。 amp。and 讀者編號 = 39。 amp。Jet OLEDB:Database Password=xgg2213 = adUseClient = adCmdText = StrSQL = CStr() g_strsql = select * from setinfo Set g_rs = (g_strsql) strcount = g_rs!借出冊數(shù) = CStr(strcount) End Sub 還書窗體 Private Sub Command1_Click() g_strsql = select * from lentinfo where 書籍編號 =39。Mode=ReadWrite。 amp。 is null = provider=。 39。 amp。 where = and 籍編號 = and _ amp。 , _ amp。 and = Set g_rs = (g_strsql) If Not Then = g_rs!書籍價(jià)格 = g_rs!書籍類別 = g_rs!書籍名稱 = g_rs!作者姓名 = g_rs!書籍頁碼 = g_rs!出版社 If g_rs!是否借出 = True Then MsgBox 對不起,該書已經(jīng)借出! , vbInformation + vbOKOnly, 信息 = False Set g_rs = Nothing Exit Sub Else = True End If Else MsgBox 對不起,館內(nèi)沒有該書信息! , vbInformation + vbOKOnly, 提示 = = = = = = = End If Set g_rs = Nothing ElseIf keyascii = 13 And = Then MsgBox 請先輸入 讀者編號! , vbInformation + vbOKOnly, 提示 Exit Sub ElseIf keyascii = 13 And And = Then MsgBox 請先輸入書籍編號! , vbInformation + vbOKOnly, 提示 Exit Sub End If End Sub Public Sub StrDataGrid() Dim StrSQL As String Dim strcount As Integer StrSQL = select , ,