📄 formdwdj.frm
字号:
VERSION 5.00
Begin VB.Form Formdwdj
Caption = "单位往来帐登记"
ClientHeight = 2370
ClientLeft = 60
ClientTop = 345
ClientWidth = 5130
LinkTopic = "Form1"
ScaleHeight = 2370
ScaleWidth = 5130
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 12
Top = 1320
Width = 1335
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 11
Top = 720
Width = 4335
End
Begin VB.CommandButton Command2
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2760
TabIndex = 10
Top = 1920
Width = 975
End
Begin VB.CommandButton Command1
Caption = "保存"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1560
TabIndex = 9
Top = 1920
Width = 975
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
ItemData = "Formdwdj.frx":0000
Left = 3720
List = "Formdwdj.frx":000A
TabIndex = 8
Top = 1320
Width = 615
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 2880
TabIndex = 4
Top = 0
Visible = 0 'False
Width = 375
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3000
TabIndex = 3
Top = 120
Width = 1935
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
Locked = -1 'True
TabIndex = 1
Top = 120
Width = 1335
End
Begin VB.Label Label5
Caption = "借贷"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2880
TabIndex = 7
Top = 1320
Width = 495
End
Begin VB.Label Label4
Caption = "金额"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 6
Top = 1320
Width = 495
End
Begin VB.Label Label3
Caption = "摘要"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 5
Top = 720
Width = 495
End
Begin VB.Label Label2
Caption = "单位名称"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1920
TabIndex = 2
Top = 120
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
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 495
End
End
Attribute VB_Name = "Formdwdj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text2.Text <> "" And Text3.Text <> "" And Text4.Text <> "" And Text5.Text <> "" And Formdwdj.Combo1.Text <> "" Then
Set rst = db.OpenRecordset("lwz", 2)
If rst.EOF = True And rst.BOF = True Then
Else
rst.MoveFirst
je = 0
Do While rst.EOF = False
If rst.Fields("dw") = Text3.Text Then
If rst.Fields("jd") = "借" Then
je = je + Val(rst.Fields("je"))
Else
je = je - Val(rst.Fields("je"))
End If
End If
rst.MoveNext
Loop
End If
If Formdwdj.Combo1.Text = "借" Then
jd = "借"
je = je + Val(Text5.Text)
Else
jd = "贷"
je = je - Val(Text5.Text)
End If
'je = Val(Text5.Text)
sql = "insert into lwz(rq,dw,zhy,jd,je,ye) values ('" + Text1.Text + "','" + Text3.Text + "','" + Text4.Text + "','" + jd + "'," + Text5.Text + ",'" + Str(je) + "')"
db.Execute sql
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Formdwdj.Combo1.Text = ""
Else
MsgBox "请完整输入资料!"
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Text1.Text = Date
End Sub
Private Sub Text1_DblClick()
Formrq.Text1.Text = 0
Formrq.Show 1
Formrq.Text1.Text = 0
End Sub
Private Sub Text2_DblClick()
Formdwzl.Command3.Caption = "选 择"
Formdwzl.Show 1
Formdwzl.Command3.Caption = "选 择"
End Sub
Private Sub Text4_DblClick()
Formzydj.Show 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -