📄 bookmanage.frm
字号:
Index = 10
Left = 120
TabIndex = 20
Top = 5895
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "摘要:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 615
Index = 9
Left = 5760
TabIndex = 18
Top = 5400
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "价格:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 495
Index = 8
Left = 240
TabIndex = 16
Top = 4680
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "页数:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 615
Index = 7
Left = 5760
TabIndex = 14
Top = 4200
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "城市:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 495
Index = 6
Left = 120
TabIndex = 12
Top = 3540
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "数量"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 615
Index = 5
Left = 5760
TabIndex = 10
Top = 3120
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "出版社:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 495
Index = 4
Left = 120
TabIndex = 8
Top = 2400
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "作者:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 735
Index = 3
Left = 5760
TabIndex = 6
Top = 1800
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "版别:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 495
Index = 2
Left = 120
TabIndex = 4
Top = 1305
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "书名:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 480
Index = 1
Left = 5760
TabIndex = 2
Top = 480
Width = 1815
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "书号:"
BeginProperty Font
Name = "隶书"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 495
Index = 0
Left = 120
TabIndex = 0
Top = 360
Width = 1815
End
End
Attribute VB_Name = "bookManage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdquery_Click()
CommonUser.Show
End Sub
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
'This is where you would put error handling code
'If you want to ignore errors, comment out the next line
'If you want to trap them, add code here to handle them
MsgBox "Data error event hit err:" & Description
End Sub
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This will display the current record position for this recordset
datPrimaryRS.Caption = "当前位置: " & CStr(datPrimaryRS.Recordset.AbsolutePosition) & "/共有:" & CStr(datPrimaryRS.Recordset.RecordCount)
End Sub
Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
cmdDelete.Enabled = Not cmdDelete.Enabled
cmdRefresh.Enabled = Not cmdRefresh.Enabled
cmdUpdate.Enabled = Not cmdUpdate.Enabled
cmdquery.Enabled = Not cmdquery.Enabled
If cmdAdd.Caption = "添加" Then
cmdAdd.Caption = "确认"
datPrimaryRS.Recordset.AddNew
Else
datPrimaryRS.Recordset.AddNew
datPrimaryRS.Refresh
datPrimaryRS.Recordset.MoveLast
cmdAdd.Caption = "添加"
End If
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With datPrimaryRS.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
datPrimaryRS.Refresh
Exit Sub
RefreshErr:
MsgBox Err.Description
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
datPrimaryRS.Recordset.UpdateBatch adAffectAll
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -