📄 分部删除.frm
字号:
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "支出"
Caption = " 支 出"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "余额"
Caption = " 余 额"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "经手人"
Caption = " 经手人"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column08
DataField = "审批人"
Caption = " 审批人"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
ScrollBars = 2
AllowRowSizing = 0 'False
AllowSizing = 0 'False
BeginProperty Column00
Alignment = 2
ColumnAllowSizing= 0 'False
ColumnWidth = 975.118
EndProperty
BeginProperty Column01
Alignment = 2
ColumnAllowSizing= 0 'False
ColumnWidth = 975.118
EndProperty
BeginProperty Column02
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1200.189
EndProperty
BeginProperty Column03
Alignment = 2
ColumnAllowSizing= 0 'False
ColumnWidth = 1679.811
EndProperty
BeginProperty Column04
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1379.906
EndProperty
BeginProperty Column05
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1230.236
EndProperty
BeginProperty Column06
Alignment = 1
ColumnAllowSizing= 0 'False
ColumnWidth = 1305.071
EndProperty
BeginProperty Column07
Alignment = 2
ColumnAllowSizing= 0 'False
ColumnWidth = 1049.953
EndProperty
BeginProperty Column08
Alignment = 2
ColumnAllowSizing= 0 'False
ColumnWidth = 989.858
EndProperty
EndProperty
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "隶书"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 3450
TabIndex = 9
Top = 210
Width = 285
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
FillColor = &H00000040&
Height = 615
Left = 2700
Shape = 4 'Rounded Rectangle
Top = 180
Width = 6225
End
Begin VB.Line Line1
BorderColor = &H80000005&
BorderWidth = 3
X1 = 30
X2 = 12000
Y1 = 960
Y2 = 960
End
End
Attribute VB_Name = "分部删除"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Num As Integer, Record As Integer, Result As Integer
Private Sub Form_Load()
On Error GoTo X1
Me.Left = 0: Me.Top = 0
Label1.Caption = 主程序.LabelName
Label1.Left = (Me.ScaleWidth - Label1.Width) / 2
Shape1.Left = (Me.ScaleWidth - Shape1.Width) / 2
Adodc1.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=DSN=商场帐务;APP=Visual Basic;WSID=YAO_WEI_SERVER;DATABASE=商场帐务;Trusted_Connection=Yes"
Adodc1.RecordSource = 主程序.FileName
Adodc1.Refresh
Adodc1.Recordset.MoveLast
Adodc1.Recordset.MoveFirst
Num = Adodc1.Recordset.RecordCount
DataGrid1.SelStart = 8
StatusBar1.Panels(1).Text = "记录总数: " & Num
StatusBar1.Panels(2).Text = "当前记录: " & 1
StatusBar1.Panels(3).Text = "今天日期: " & Format(Date, "yyyy 年 m 月 d 日")
StatusBar1.Panels(4).Text = "当前时间: " & Time
Exit Sub
X1:
MsgBox " 数据库中无记录 ! ", vbExclamation
End Sub
Private Sub Command1_Click()
Dim FileName1, FileName2 As String
On Error GoTo A1
Result = MsgBox("是否保存当前数据 ?", vbYesNo + vbQuestion)
If Result = 6 Then
CommonDialog1.Filter = "数据库文件 (*.mdb)|*.mdb"
CommonDialog1.ShowOpen
FileName1 = CommonDialog1.FileName
CommonDialog1.ShowSave
FileName2 = CommonDialog1.FileName
If FileName1 = FileName2 Then
MsgBox " 文件已经存在,请更改文件名 !", vbOKOnly + vbExclamation
Exit Sub
End If
FileCopy FileName1, FileName2
Do While Adodc1.Recordset.EOF = False
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
Loop
Else
Do While Adodc1.Recordset.EOF = False
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
Loop
End If
A1:
Command1.Enabled = False: Command2.Enabled = False: Command3.Enabled = False: Command4.Enabled = False
Command5.Enabled = False: Command6.Enabled = False
End Sub
Private Sub Command2_Click()
On Error GoTo A1
Record = DataGrid1.Row
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveLast
Num = Adodc1.Recordset.RecordCount
StatusBar1.Panels(1).Text = "记录总数: " & Num
Adodc1.Recordset.MoveFirst
If Record = Num Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Move Record - 1
StatusBar1.Panels(2).Text = "当前记录: " & Record
Else
Adodc1.Recordset.Move Record
StatusBar1.Panels(2).Text = "当前记录: " & Record + 1
End If
Exit Sub
A1:
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MoveFirst
StatusBar1.Panels(2).Text = "当前记录: " & Adodc1.Recordset.AbsolutePosition
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.AbsolutePosition = adPosBOF Then
Adodc1.Recordset.MoveFirst
StatusBar1.Panels(2).Text = "当前记录: " & 1
Result = MsgBox("已经是第一条记录 ! ", vbExclamation)
Else
StatusBar1.Panels(2).Text = "当前记录: " & Adodc1.Recordset.AbsolutePosition
End If
End Sub
Private Sub Command5_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.AbsolutePosition = adPosEOF Then
Adodc1.Recordset.MoveLast
StatusBar1.Panels(2).Text = "当前记录: " & Num
Result = MsgBox("已经是最后一条记录 ! ", vbExclamation)
Else
StatusBar1.Panels(2).Text = "当前记录: " & Adodc1.Recordset.AbsolutePosition
End If
End Sub
Private Sub Command6_Click()
Adodc1.Recordset.MoveLast
StatusBar1.Panels(2).Text = "当前记录: " & Adodc1.Recordset.AbsolutePosition
End Sub
Private Sub Command7_Click()
Unload Me
主程序.Show
End Sub
Private Sub DataGrid1_SelChange(Cancel As Integer)
StatusBar1.Panels(2).Text = "当前记录: " & Adodc1.Recordset.AbsolutePosition
End Sub
Private Sub Timer1_Timer()
StatusBar1.Panels(4).Text = "当前时间: " & Time
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -