📄 form2.frm
字号:
EndProperty
Height = 495
Left = 1920
TabIndex = 11
Top = 2880
Width = 1695
End
Begin VB.TextBox Text5
DataField = "图书证号"
DataSource = "Adodc1"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5280
TabIndex = 10
Top = 1080
Width = 1815
End
Begin VB.TextBox Text4
DataField = "书名"
DataSource = "Adodc1"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1920
TabIndex = 9
Top = 1125
Width = 1695
End
Begin VB.TextBox Text3
DataField = "借阅日期"
DataSource = "Adodc1"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1920
TabIndex = 8
Top = 1995
Width = 1695
End
Begin VB.TextBox Text2
DataField = "姓名"
DataSource = "Adodc1"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5280
TabIndex = 7
Top = 240
Width = 1815
End
Begin VB.TextBox Text1
DataField = "编号"
DataSource = "Adodc1"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1920
TabIndex = 6
Top = 240
Width = 1695
End
Begin VB.Image Image1
Height = 3405
Left = 10680
Picture = "Form2.frx":0457
Stretch = -1 'True
Top = 240
Width = 2655
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "备注"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3960
TabIndex = 20
Top = 2040
Width = 855
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "归还日期"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 720
TabIndex = 5
Top = 2880
Width = 975
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "图书证号"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3960
TabIndex = 4
Top = 960
Width = 975
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "书名"
DataField = "书名"
DataSource = "Adodc1"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 720
TabIndex = 3
Top = 1125
Width = 975
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "借阅日期"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 720
TabIndex = 2
Top = 1920
Width = 975
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "姓名"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3960
TabIndex = 1
Top = 240
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "编号"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 720
TabIndex = 0
Top = 240
Width = 975
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Adodc1.Recordset.EOF Then
MsgBox "记录空", vbOKCancel + vbQuestion
End
Else
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
MsgBox "这是第一条记录", vbOKCancel + vbQuestion
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
MsgBox "这是最后一条记录", vbOKCancel + vbQuestion
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command4_Click()
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "记录空", vbOKCancel + vbQuestion
End
Else
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command5_Click()
On Error GoTo adderr '捕捉错误
Text1.SetFocus
Adodc1.Recordset.AddNew
Exit Sub
adderr:
MsgBox Err.Description
End Sub
Private Sub Command6_Click()
On Error GoTo deleteerr '捕捉错误
If Not Adodc1.Recordset.BOF And Not Adodc1.Recordset.EOF Then
If MsgBox("删除当前记录吗?", vbYesNo + vbQuestion) = vbYes Then 'msgbox "窗口标题","窗体显示内容",VBYes执行程序段
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
End If
End If
Exit Sub
deleteerr:
MsgBox Err.Description
End Sub
Private Sub Command7_Click()
Unload Me
'Form2.Hide
End Sub
Private Sub Text1_Change()
End Sub
Private Sub Text2_Change()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -