📄 frmbookborrow.frm
字号:
VERSION 5.00
Begin VB.Form frmBookBorrow
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 cmdBorrow
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 = "frmBookBorrow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdBorrow_Click()
Dim rsRecordSet As New ADODB.Recordset
strsql = "select * from borrowinfo "
rsRecordSet.Open strsql, connConnection, adOpenKeyset, adLockPessimistic
rsRecordSet.AddNew
rsRecordSet.Fields(0) = txtReadNo.Text
rsRecordSet.Fields(1) = txtBookNo.Text
rsRecordSet.Fields(2) = Data
rsRecordSet.Fields(3) = DateAdd("Ww", 30, Date)
rsRecordSet.Update
MsgBox "借书成功", vbOKOnly + vbExclamation
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 + -