📄 datamfrm.frm
字号:
VERSION 5.00
Begin VB.Form datamfrm
Caption = "金额统计"
ClientHeight = 5580
ClientLeft = 45
ClientTop = 330
ClientWidth = 8355
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6183.378
ScaleMode = 0 'User
ScaleWidth = 8498.557
Begin VB.CommandButton Command2
Caption = "报表打印"
Height = 375
Left = 4680
TabIndex = 28
Top = 4920
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "打印预览"
Height = 372
Left = 1440
TabIndex = 26
Top = 4920
Width = 1215
End
Begin VB.Frame Frame3
Caption = "应交金额"
Height = 732
Left = 480
TabIndex = 22
Top = 3840
Width = 6612
Begin VB.TextBox txtxx
Enabled = 0 'False
Height = 372
Left = 5040
TabIndex = 25
Text = "0"
Top = 240
Width = 1452
End
Begin VB.Label Label11
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Height = 375
Left = 1080
TabIndex = 27
Top = 240
Width = 3135
End
Begin VB.Label Label10
Caption = "(小写):"
Height = 252
Left = 4200
TabIndex = 24
Top = 360
Width = 1332
End
Begin VB.Label Label9
Caption = "(大写):"
Height = 252
Left = 240
TabIndex = 23
Top = 360
Width = 972
End
End
Begin VB.TextBox txtjehj
Enabled = 0 'False
Height = 264
Left = 4440
TabIndex = 21
Text = "0"
Top = 3240
Width = 1095
End
Begin VB.TextBox txtzshj
Enabled = 0 'False
Height = 264
Left = 3000
TabIndex = 20
Text = "0"
Top = 3240
Width = 1095
End
Begin VB.TextBox txtje5
Enabled = 0 'False
Height = 264
Left = 4440
TabIndex = 18
Text = "0"
Top = 840
Width = 1095
End
Begin VB.TextBox txtje10
Enabled = 0 'False
Height = 264
Left = 4440
TabIndex = 17
Text = "0"
Top = 1320
Width = 1095
End
Begin VB.TextBox txtje15
Enabled = 0 'False
Height = 264
Left = 4440
TabIndex = 16
Text = "0"
Top = 1800
Width = 1095
End
Begin VB.TextBox txtje20
Enabled = 0 'False
Height = 264
Left = 4440
TabIndex = 15
Text = "0"
Top = 2280
Width = 1095
End
Begin VB.TextBox txtje30
Enabled = 0 'False
Height = 264
Left = 4440
TabIndex = 14
Text = "0"
Top = 2760
Width = 1095
End
Begin VB.TextBox txtzs5
Enabled = 0 'False
Height = 264
Left = 3000
TabIndex = 13
Text = "0"
Top = 840
Width = 1095
End
Begin VB.TextBox txtzs10
Enabled = 0 'False
Height = 264
Left = 3000
TabIndex = 12
Text = "0"
Top = 1320
Width = 1095
End
Begin VB.TextBox txtzs15
Enabled = 0 'False
Height = 264
Left = 3000
TabIndex = 11
Text = "0"
Top = 1800
Width = 1095
End
Begin VB.TextBox txtzs20
Enabled = 0 'False
Height = 264
Left = 3000
TabIndex = 10
Text = "0"
Top = 2280
Width = 1095
End
Begin VB.TextBox txtzs30
Enabled = 0 'False
Height = 264
Left = 3000
TabIndex = 9
Text = "0"
Top = 2760
Width = 1095
End
Begin VB.Frame Frame2
Caption = "售出票据"
Height = 3372
Left = 2160
TabIndex = 6
Top = 240
Width = 4215
Begin VB.Label Label7
Caption = "金额"
Height = 252
Left = 2520
TabIndex = 8
Top = 360
Width = 612
End
Begin VB.Label Label6
Caption = "张数"
Height = 252
Left = 1080
TabIndex = 7
Top = 360
Width = 492
End
End
Begin VB.Frame Frame1
Caption = "票面金额"
Height = 3372
Left = 480
TabIndex = 0
Top = 240
Width = 1092
Begin VB.Label Label8
Caption = "合 计"
Height = 252
Left = 240
TabIndex = 19
Top = 3000
Width = 612
End
Begin VB.Label Label5
Caption = "5元"
Height = 255
Left = 480
TabIndex = 5
Top = 600
Width = 375
End
Begin VB.Label Label4
Caption = "10元"
Height = 255
Left = 360
TabIndex = 4
Top = 1080
Width = 375
End
Begin VB.Label Label3
Caption = "15元"
Height = 252
Left = 360
TabIndex = 3
Top = 1560
Width = 372
End
Begin VB.Label Label2
Caption = "20元"
Height = 255
Left = 360
TabIndex = 2
Top = 2040
Width = 375
End
Begin VB.Label Label1
Caption = "30元"
Height = 255
Left = 360
TabIndex = 1
Top = 2520
Width = 375
End
End
End
Attribute VB_Name = "datamfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim cnnjinbin As New ADODB.Connection
Dim rstjinbin As New ADODB.Recordset
Private Sub Command1_Click()
With cnnjinbin
If .State = adStateOpen Then
.Close
End If
.Provider = "microsoft.jet.oledb.4.0"
.ConnectionString = App.Path & "\jinbin.mdb"
.Open
End With
With rstjinbin
If .State = adStateOpen Then
.Close
End If
.LockType = adLockReadOnly
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.ActiveConnection = cnnjinbin
.Source = "select * from data order by bh desc "
.Open
wt.viewprint
With printfrm
.Height = 7960
.ScaleHeight = 7950
.ScaleWidth = 10000
.Width = 11000
End With
End With
datamfrm.Hide
Unload Me
End Sub
Private Sub Command2_Click()
With cnnjinbin
If .State = adStateOpen Then
.Close
End If
.Provider = "microsoft.jet.oledb.4.0"
.ConnectionString = App.Path & "\jinbin.mdb"
.Open
End With
With rstjinbin
If .State = adStateOpen Then
.Close
End If
.LockType = adLockReadOnly
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.ActiveConnection = cnnjinbin
.Source = "select * from data order by bh desc "
.Open
wt.prn
End With
'清空复选框
datafrm.Check1.Value = Unchecked
'清空起止号
datafrm.txt5b.Text = ""
datafrm.txt5e.Text = ""
datafrm.txt10b.Text = ""
datafrm.txt10e.Text = ""
datafrm.txt15b.Text = ""
datafrm.txt15e.Text = ""
datafrm.txt20b.Text = ""
datafrm.txt20e.Text = ""
datafrm.txt30b.Text = ""
datafrm.txt30e.Text = ""
datafrm.txtsfname.Text = ""
datafrm.txtgonghao.Text = ""
datafrm.txtgonghao1.Text = ""
checkfrm.txt5b1.Text = ""
checkfrm.txt5e1.Text = ""
checkfrm.txt5b2.Text = ""
checkfrm.txt5e2.Text = ""
checkfrm.txt10b1.Text = ""
checkfrm.txt10e1.Text = ""
checkfrm.txt10b2.Text = ""
checkfrm.txt10e2.Text = ""
checkfrm.txt15b1.Text = ""
checkfrm.txt15e1.Text = ""
checkfrm.txt15b2.Text = ""
checkfrm.txt15e2.Text = ""
checkfrm.txt20b1.Text = ""
checkfrm.txt20e1.Text = ""
checkfrm.txt20b2.Text = ""
checkfrm.txt20e2.Text = ""
checkfrm.txt30b1.Text = ""
checkfrm.txt30e1.Text = ""
checkfrm.txt30b2.Text = ""
checkfrm.txt30e2.Text = ""
datamfrm.Hide
Unload Me
End Sub
Private Sub Form_Load()
With datamfrm
.Height = 6000
.ScaleHeight = 6200
.ScaleWidth = 7900
.Width = 7800
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -