?? frmbookreturn.frm
字號:
VERSION 5.00
Begin VB.Form frmBookReturn
Caption = "還書"
ClientHeight = 2445
ClientLeft = 60
ClientTop = 345
ClientWidth = 4710
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2445
ScaleWidth = 4710
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdClose
Caption = "退出"
Height = 375
Left = 3000
TabIndex = 5
Top = 1800
Width = 1335
End
Begin VB.CommandButton cmdReturn
Caption = "還書"
Height = 375
Left = 360
TabIndex = 4
Top = 1800
Width = 1335
End
Begin VB.TextBox txtBookNo
Height = 375
Left = 2160
TabIndex = 3
Top = 960
Width = 2175
End
Begin VB.TextBox txtReadNo
Height = 375
Left = 2160
TabIndex = 1
Top = 360
Width = 2175
End
Begin VB.Label Label2
Caption = "書號"
Height = 375
Left = 360
TabIndex = 2
Top = 960
Width = 1455
End
Begin VB.Label Label1
Caption = "學號"
Height = 375
Left = 360
TabIndex = 0
Top = 360
Width = 1455
End
End
Attribute VB_Name = "frmBookReturn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdReturn_Click()
Dim sql As String
Set rsRecordSet = New ADODB.Recordset
strsql = "select * from borrowinfo where readerId='" & txtReadNo.Text & "' and bookId='" & txtBookNo.Text & "'"
rsRecordSet.Open strsql, connConnection, adOpenKeyset, adLockPessimistic
If rsRecordSet.Fields(0) <> "" Then
rsRecordSet.Delete
rsRecordSet.Update
MsgBox "還書成功", vbOKOnly + vbExclamation
Else
MsgBox "不存在此借書記錄", , ""
Error ""
End If
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub txtBookNo_LostFocus()
If txtBookNo.Text = "" Then
MsgBox "請輸入圖書號,且為整數", , "Error"
End If
End Sub
Private Sub txtReadNo_LostFocus()
If txtReadNo.Text = "" Then
MsgBox "請輸入學號,且為整數", , "Error"
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -