📄 xinxi.frm
字号:
VERSION 5.00
Begin VB.Form Xinxi
AutoRedraw = -1 'True
BackColor = &H00808000&
BorderStyle = 3 'Fixed Dialog
ClientHeight = 3630
ClientLeft = 45
ClientTop = 45
ClientWidth = 4995
ControlBox = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3630
ScaleWidth = 4995
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton ClearQk
Caption = "还清所有欠款"
Height = 360
Left = 330
TabIndex = 11
Top = 3075
Width = 4395
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 345
Left = 1380
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 3615
Width = 1560
End
Begin VB.Label HjLab
BorderStyle = 1 'Fixed Single
ForeColor = &H00FF0000&
Height = 315
Left = 2100
TabIndex = 10
Top = 1995
Width = 2280
End
Begin VB.Label SfkLab
BorderStyle = 1 'Fixed Single
ForeColor = &H00FF0000&
Height = 315
Left = 2100
TabIndex = 9
Top = 1485
Width = 2280
End
Begin VB.Label QkLab
BorderStyle = 1 'Fixed Single
Caption = "sdfsdfsdfsdf"
ForeColor = &H00FF0000&
Height = 315
Left = 2100
TabIndex = 8
Top = 1005
Width = 2280
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "购物合计金额:"
Height = 180
Left = 720
TabIndex = 7
Top = 2025
Width = 1260
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "已付人民币:"
Height = 180
Left = 795
TabIndex = 6
Top = 1560
Width = 1080
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "欠款总额:"
Height = 180
Left = 870
TabIndex = 5
Top = 1080
Width = 900
End
Begin VB.Line Line8
X1 = 285
X2 = 285
Y1 = 705
Y2 = 2550
End
Begin VB.Line Line7
BorderColor = &H00FFFFFF&
X1 = 4695
X2 = 4695
Y1 = 660
Y2 = 2565
End
Begin VB.Line Line6
X1 = 4635
X2 = 4635
Y1 = 750
Y2 = 2490
End
Begin VB.Line Line5
BorderColor = &H00FFFFFF&
X1 = 330
X2 = 330
Y1 = 750
Y2 = 2535
End
Begin VB.Line Line4
BorderColor = &H00C0C0FF&
X1 = 285
X2 = 4680
Y1 = 2550
Y2 = 2550
End
Begin VB.Line Line3
X1 = 345
X2 = 4635
Y1 = 2490
Y2 = 2490
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "asdfdfsfdfdfsffdffdf"
ForeColor = &H00FFFF00&
Height = 240
Left = 1005
TabIndex = 4
Top = 2760
Width = 3540
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "时间:"
ForeColor = &H00800000&
Height = 180
Left = 420
TabIndex = 3
Top = 2745
Width = 540
End
Begin VB.Line Line2
BorderColor = &H00E0E0E0&
BorderWidth = 3
X1 = 330
X2 = 4620
Y1 = 750
Y2 = 750
End
Begin VB.Line Line1
BorderColor = &H00808080&
BorderWidth = 3
X1 = 285
X2 = 4665
Y1 = 690
Y2 = 690
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "欠款资料"
ForeColor = &H0000C0C0&
Height = 180
Left = 3630
TabIndex = 2
Top = 405
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "客户名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 210
Left = 2115
TabIndex = 1
Top = 360
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "客户:"
ForeColor = &H0000C0C0&
Height = 180
Left = 660
TabIndex = 0
Top = 390
Width = 450
End
End
Attribute VB_Name = "Xinxi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub ClearQk_Click()
hqk = MsgBox("真的还清所有欠款吗?(Y/N)", vbYesNo + 48, "还欠款")
If hqk = 6 Then
Dim db As Database
Set db = OpenDatabase(appData)
strs0 = "update guestfindk set 欠款=0,实付款=合计 where "
If TjZijin.Option3.Value = True Then
strs0 = strs0 & "购货人='" & Trim(ZJXianXi.DBGrid1.Text) & "' and 日期=#" & TempRqF & "#"
strs1 = "update fpk set 欠款=0,实付款=合计 where "
strs1 = strs1 & "购货人='" & Trim(ZJXianXi.DBGrid1.Text) & "' and 日期=#" & TempRqF & "#"
Else
strs1 = "update fpk set 欠款=0,实付款=合计 where "
strs1 = strs1 & "购货人='" & Trim(ZJXianXi.DBGrid1.Text) & "' and 日期 BETWEEN #" & TempRqF & "# and #" & TempRqE & "#"
strs0 = strs0 & "购货人='" & Trim(ZJXianXi.DBGrid1.Text) & "' and 日期 BETWEEN #" & TempRqF & "# and #" & TempRqE & "#"
End If
db.Execute strs0
db.Execute strs1
db.Close
ZJXianXi.Data1.Refresh
ZJXianXi.Qktxt.Caption = 0
ZJXianXi.Sfktxt.Caption = ZJXianXi.Hjtxt.Caption
TjZijin.Text6.Text = 0
TjZijin.Text5.Text = TjZijin.Text4.Text
Unload Me
Exit Sub
Else
MsgBox "下次吧?", vbOKOnly + 48, "没还钱"
Exit Sub
End If
End Sub
Private Sub Form_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label2.Caption = ZJXianXi.DBGrid1.Text
Label5.Caption = ZJXianXi.Caption
Data1.DatabaseName = appData
If TjZijin.Option3.Value = True Then
'统计客户欠款总数,实付款总数,合计总数
Dim qkNum As Currency, sfkNum As Currency, hjNum As Currency, CountNum As Integer
RecordStr = "select sum(欠款) as qkc,sum(实付款) as sfkc,sum(合计) as hjc from guestfindk where "
RecordStr = RecordStr & "购货人='" & Trim(ZJXianXi.DBGrid1.Text) & "' and 日期=#" & TempRqF & "#"
Data1.RecordSource = RecordStr
Data1.Refresh
If IsNull(Data1.Recordset.Fields(0)) Then
qkNum = 0
Else
qkNum = Data1.Recordset.Fields(0)
End If
If IsNull(Data1.Recordset.Fields(1)) Then
sfkNum = 0
Else
sfkNum = Data1.Recordset.Fields(1)
End If
If IsNull(Data1.Recordset.Fields(2)) Then
hjNum = 0
Else
hjNum = Data1.Recordset.Fields(2)
End If
'显示欠款,实付款,合计总数
Qklab.Caption = qkNum
Sfklab.Caption = sfkNum
HjLab.Caption = hjNum
If qkNum = 0 Then
ClearQk.Enabled = False
End If
Exit Sub
End If
'统计客户欠款总数,实付款总数,合计总数
RecordStr = "select sum(欠款) as qkc,sum(实付款) as sfkc,sum(合计) as hjc from guestfindk where "
RecordStr = RecordStr & "(购货人='" & Trim(ZJXianXi.DBGrid1.Text) & "' and 日期 BETWEEN #" & TempRqF & "# and #" & TempRqE & "#)"
Data1.RecordSource = RecordStr
Data1.Refresh
If IsNull(Data1.Recordset.Fields(0)) Then
qkNum = 0
Else
qkNum = Data1.Recordset.Fields(0)
End If
If IsNull(Data1.Recordset.Fields(1)) Then
sfkNum = 0
Else
sfkNum = Data1.Recordset.Fields(1)
End If
If IsNull(Data1.Recordset.Fields(2)) Then
hjNum = 0
Else
hjNum = Data1.Recordset.Fields(2)
End If
'显示欠款,实付款,合计总数
If qkNum = 0 Then
ClearQk.Enabled = False
End If
Qklab.Caption = qkNum
Sfklab.Caption = sfkNum
HjLab.Caption = hjNum
End Sub
Private Sub HjLab_Click()
Unload Me
End Sub
Private Sub Label1_Click()
Unload Me
End Sub
Private Sub Label2_Click()
Unload Me
End Sub
Private Sub Label3_Click()
Unload Me
End Sub
Private Sub Label4_Click()
Unload Me
End Sub
Private Sub Label5_Click()
Unload Me
End Sub
Private Sub Label6_Click()
Unload Me
End Sub
Private Sub Label7_Click()
Unload Me
End Sub
Private Sub Label8_Click()
Unload Me
End Sub
Private Sub QkLab_Click()
Unload Me
End Sub
Private Sub SfkLab_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -