📄 frmbookborrowupdate.frm
字号:
VERSION 5.00
Begin VB.Form frmBookBorrowUpdate
Caption = "出借信息删除"
ClientHeight = 4380
ClientLeft = 60
ClientTop = 450
ClientWidth = 6285
LinkTopic = "Form9"
ScaleHeight = 4380
ScaleWidth = 6285
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command5
Caption = "清空"
Height = 375
Left = 840
TabIndex = 11
Top = 3720
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "删除"
Height = 375
Left = 2760
TabIndex = 10
Top = 3720
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 375
Left = 4800
TabIndex = 9
Top = 3720
Width = 1215
End
Begin VB.TextBox txtBookName
Height = 375
Left = 2760
TabIndex = 8
Top = 1560
Width = 3135
End
Begin VB.TextBox txtDate
Height = 375
Left = 2760
TabIndex = 7
Top = 2280
Width = 3135
End
Begin VB.TextBox txtMemo
Height = 375
Left = 2760
TabIndex = 6
Top = 3000
Width = 3135
End
Begin VB.TextBox txtName
Height = 375
Left = 2760
TabIndex = 5
Top = 840
Width = 3135
End
Begin VB.Label Label6
Caption = "书名"
Height = 375
Left = 480
TabIndex = 4
Top = 1560
Width = 1815
End
Begin VB.Label Label5
Caption = "借阅日期"
Height = 375
Left = 480
TabIndex = 3
Top = 2280
Width = 1815
End
Begin VB.Label Label4
Caption = "备注"
Height = 375
Left = 480
TabIndex = 2
Top = 3000
Width = 1815
End
Begin VB.Label Label2
Caption = "借阅者姓名"
Height = 375
Left = 480
TabIndex = 1
Top = 840
Width = 1815
End
Begin VB.Label Label1
Caption = "输入借阅者的姓名或书名点击确定,将调出此书相关信息。"
Height = 255
Left = 120
TabIndex = 0
Top = 240
Width = 4695
End
End
Attribute VB_Name = "frmBookBorrowUpdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
Dim conn As ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String
Dim N As Boolean
N = True
Set conn = New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=book.mdb;Persist Security Info=False"
conn.Open
If Trim(txtName.Text) = "" Then
MsgBox "借阅者姓名不能为空", vbOKOnly + vbExclamation, ""
txtName.SetFocus
N = False
End If
If Trim(txtBookName.Text) = "" Then
MsgBox "书名不能为空", vbOKOnly + vbExclamation, ""
N = False
End If
If Trim(txtDate.Text) = "" Then
MsgBox "日期不能为空", vbOKOnly + vbExclamation, ""
txtDate.SetFocus
N = False
End If
If N = True Then
sql = "select * from BorrowInfo where StudentName ='" + txtName.Text + "'and BookName='" + txtBookName.Text + "'and BorrowDate='" + txtDate.Text + "'"
rs.Open sql, conn, adOpenKeyset, adLockPessimistic
If Not rs.EOF Then
rs.Delete
rs.Update
MsgBox "书籍还入信息已经删除", vbOKOnly + vbExclamation, ""
Else
MsgBox "书籍还入信息不存在", vbOKOnly + vbExclamation, ""
End If
End If
End Sub
Private Sub Command5_Click()
txtName.Text = ""
txtBookName.Text = ""
txtDate.Text = ""
txtMemo.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -