📄 yfzk1.frm
字号:
End
Begin VB.Label Label14
Caption = "经手人"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Left = 120
TabIndex = 13
Top = 1200
Width = 855
End
Begin VB.Label Label12
Caption = "付款方式"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 120
TabIndex = 12
Top = 720
Width = 975
End
Begin VB.Label Label1
Caption = "付款日期"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 120
TabIndex = 11
Top = 240
Width = 975
End
Begin VB.Label Label15
Caption = "备注"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Left = 5640
TabIndex = 10
Top = 840
Width = 495
End
End
Begin VB.Data Data3
Caption = "Data3"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 645
Left = 1800
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 3720
Visible = 0 'False
Width = 2175
End
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 615
Left = 4200
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 3000
Visible = 0 'False
Width = 2175
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 615
Left = 2040
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 3000
Visible = 0 'False
Width = 2055
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid
Bindings = "yfzk1.frx":046E
Height = 3855
Left = 120
TabIndex = 2
Top = 1920
Width = 7815
_ExtentX = 13785
_ExtentY = 6800
_Version = 393216
Rows = 20
Cols = 7
BackColor = -2147483624
ForeColor = -2147483642
ForeColorFixed = 0
BackColorSel = 64
ForeColorSel = 16777215
BackColorBkg = 16777215
FocusRect = 2
GridLines = 3
AllowUserResizing= 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
End
Attribute VB_Name = "yfzk1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public dj, c As Integer
Public xgorbc As Boolean
Public bc As Boolean
Private Sub Combo3_Click()
Data2.Recordset.FindFirst "ddbh= '" & Combo3.Text & "'"
Text9.Text = Data2.Recordset("ljje") - Data2.Recordset("dingjin")
Data1.Recordset.FindFirst "fkdbh= '" & Combo3.Text & "'"
If Data1.Recordset.NoMatch = False Then
MsgBox "此订单已经存在,若是" & vbCrLf & vbCrLf & "余额请在其他中处理。", vbInformation, "提示"
Exit Sub
End If
End Sub
Private Sub Command1_Click()
If dj = 1 Then
'bc=False
Data1.Recordset.FindFirst "fkdbh = '" & MSFlexGrid.TextMatrix(c, 1) & "'"
DTPicker1.Value = Data1.Recordset("fkrq")
Combo1.Text = Data1.Recordset("fkfs")
Combo3.Text = Data1.Recordset("fkdbh")
Text9.Text = Data1.Recordset("yfzk")
Text10.Text = Data1.Recordset("sfzk")
Text3.Text = Data1.Recordset("ye")
Text13.Text = Data1.Recordset("bz")
Response = MsgBox("确实要删除当前收款单吗?", vbYesNo + vbCritical + vbDefaultButton1, "提示")
If Response = vbYes Then
Data2.Recordset.Delete
Data2.Refresh
DTPicker1.Value = Date
Combo1.Text = ""
Combo3.Text = ""
Text9.Text = ""
Text10.Text = ""
Text3.Text = ""
Text13.Text = ""
dj = 0
Else
Exit Sub
End If
Else
MsgBox "请先选择好要删除的对象。 ", vbInformation, "提示"
Exit Sub
End If
End Sub
Private Sub Command2_Click()
czfkd.Show
End Sub
Private Sub Command3_Click()
If Combo1.Text = "" Then
MsgBox "付款方式不能为空。", vbExclamation, "提示"
Combo1.SetFocus
Exit Sub
End If
If Combo3.Text = "" Then
MsgBox "付款单编号不能为空。", vbExclamation, "提示"
Exit Sub
End If
If Len(Text13.Text) > 25 Then
MsgBox "备注不能为超过25个字。", vbExclamation, "提示"
Exit Sub
End If
bc = True
If dj = 2 Then
Data1.Recordset.Edit
Else
Data1.Recordset.AddNew
End If
Data1.Recordset("fkdbh") = Combo3.Text
Data1.Recordset("fkrq") = DTPicker1.Value
Data1.Recordset("fkfs") = Combo1.Text
Data1.Recordset("jsr") = Label3.Caption
Data1.Recordset("yfzk") = Val(Text9.Text)
Data1.Recordset("sfzk") = Val(Text10.Text)
Data1.Recordset("ye") = Val(Text3.Text)
Data1.Recordset("bz") = Text13.Text
Data1.Recordset.Update
Data1.Refresh
MSFlexGrid.ColWidth(0) = 200
MSFlexGrid.ColWidth(1) = 1500
MSFlexGrid.ColWidth(2) = 1200
MSFlexGrid.ColWidth(3) = 1300
MSFlexGrid.TextMatrix(0, 1) = " 付款单编号"
MSFlexGrid.TextMatrix(0, 2) = " 付款日期"
MSFlexGrid.TextMatrix(0, 3) = "应付帐款"
MSFlexGrid.TextMatrix(0, 4) = "实付帐款"
MSFlexGrid.TextMatrix(0, 6) = "余额 "
MSFlexGrid.TextMatrix(0, 5) = "付款方式"
MSFlexGrid.TextMatrix(0, 7) = "经手人 "
MSFlexGrid.TextMatrix(0, 8) = "备注 "
DTPicker1.Value = Date
Combo1.Text = ""
Combo3.Text = ""
Text9.Text = ""
Text10.Text = ""
Text3.Text = ""
Text13.Text = ""
End Sub
Private Sub Command4_Click()
If Combo1.Text <> "" Or Combo3.Text <> "" Then
Response = MsgBox("当前记录还没有保存,是否需要保存?", vbYesNo + vbInformation + vbDefaultButton1, "提示")
If Response = vbYes Then
Call Command3_Click
Unload Me
Else
Unload Me
End If
Else
Unload Me
End If
End Sub
Private Sub Command5_Click()
If dj = 1 Then
bc = False
Data1.Recordset.FindFirst "fkdbh = '" & MSFlexGrid.TextMatrix(c, 1) & "'"
DTPicker1.Value = Data1.Recordset("fkrq")
Combo1.Text = Data1.Recordset("fkfs")
Combo3.Text = Data1.Recordset("fkdbh")
Text9.Text = Data1.Recordset("yfzk")
Text10.Text = Data1.Recordset("sfzk")
Text3.Text = Data1.Recordset("ye")
Text13.Text = Data1.Recordset("bz")
dj = 2
Else
MsgBox "请先选择好要修改的对象。 ", vbInformation, "提示"
Exit Sub
End If
End Sub
Private Sub Dir1_Click()
End Sub
Private Sub Command6_Click()
bc = False
DTPicker1.Value = Date
Combo1.Text = ""
Combo3.Text = ""
Text9.Text = ""
Text10.Text = ""
Text3.Text = ""
Text13.Text = ""
End Sub
Private Sub Form_Activate()
DTPicker1.Value = Date
'Data2.Recordset.Update
Dim incount As Integer
Dim jj, ll, je As Variant
'Data2.Recordset.MoveLast
'incount = Data2.Recordset.RecordCount
'Data2.Recordset.MoveFirst
'载入经手人
Data3.Recordset.MoveLast
zycount = Data3.Recordset.RecordCount
Data3.Recordset.MoveFirst
Data3.Recordset.MoveNext
Data3.Recordset.MoveFirst
Data2.Recordset.MoveLast
tj = Data2.Recordset.RecordCount
Data2.Recordset.MoveFirst
Combo3.Clear
For t = 1 To tj
Combo3.AddItem Data2.Recordset("ddbh")
Data2.Recordset.MoveNext
Next
Data2.Recordset.MoveFirst
MSFlexGrid.ColWidth(0) = 200
MSFlexGrid.ColWidth(1) = 1500
MSFlexGrid.ColWidth(2) = 1200
MSFlexGrid.ColWidth(3) = 1300
MSFlexGrid.TextMatrix(0, 1) = " 收款单编号"
MSFlexGrid.TextMatrix(0, 2) = " 收款日期"
MSFlexGrid.TextMatrix(0, 3) = "应付帐款"
MSFlexGrid.TextMatrix(0, 4) = "实付帐款"
MSFlexGrid.TextMatrix(0, 5) = "余额 "
MSFlexGrid.TextMatrix(0, 6) = "付款方式"
MSFlexGrid.TextMatrix(0, 7) = "经手人 "
MSFlexGrid.TextMatrix(0, 8) = "备注 "
bc = True
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\db1.mdb"
Data1.RecordSource = "select fkdbh,fkrq,yfzk,sfzk,ye,fkfs,jsr,bz from jhfkd"
Data2.DatabaseName = App.Path & "\db1.mdb"
Data2.RecordSource = "select * from spdhd "
Data3.DatabaseName = App.Path & "\db1.mdb"
Data3.RecordSource = "select * from zyzl"
Label3.Caption = dlm
End Sub
Private Sub Label17_Click()
'Debug.Print Date
End Sub
Private Sub MSFlexGrid_Click()
dj = 1
c = MSFlexGrid.Row
End Sub
Private Sub Text3_Click()
Text3.Text = Val(Text9.Text) - Val(Text10.Text)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -