📄 test22.frm
字号:
VERSION 5.00
Begin VB.Form test22
Caption = "Form1"
ClientHeight = 3510
ClientLeft = 60
ClientTop = 420
ClientWidth = 6540
LinkTopic = "Form1"
ScaleHeight = 3510
ScaleWidth = 6540
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 375
Index = 0
Left = 960
TabIndex = 16
Top = 360
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 1
Left = 960
TabIndex = 15
Top = 840
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 2
Left = 960
TabIndex = 14
Top = 1320
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 3
Left = 960
TabIndex = 13
Top = 1800
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 4
Left = 960
TabIndex = 12
Top = 2280
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 5
Left = 3000
TabIndex = 11
Top = 360
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 6
Left = 3000
TabIndex = 10
Top = 840
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 7
Left = 3000
TabIndex = 9
Top = 1320
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 8
Left = 3000
TabIndex = 8
Top = 1800
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 9
Left = 3000
TabIndex = 7
Top = 2280
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 10
Left = 5040
TabIndex = 6
Top = 360
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Index = 11
Left = 5040
TabIndex = 5
Top = 840
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Index = 12
Left = 5040
TabIndex = 4
Top = 1320
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Index = 13
Left = 5040
TabIndex = 3
Top = 1800
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Index = 14
Left = 5040
TabIndex = 2
Top = 2280
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "增 加 修 改"
Height = 495
Left = 1440
TabIndex = 1
Top = 2880
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "返 回"
Height = 495
Left = 3600
TabIndex = 0
Top = 2880
Width = 1575
End
Begin VB.Label Label1
Caption = "累计余额"
Height = 255
Index = 0
Left = 4200
TabIndex = 31
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "商品编号"
Height = 255
Index = 1
Left = 120
TabIndex = 30
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "客户编号"
Height = 255
Index = 2
Left = 120
TabIndex = 29
Top = 1440
Width = 735
End
Begin VB.Label Label1
Caption = "销售日期"
Height = 255
Index = 3
Left = 120
TabIndex = 28
Top = 1920
Width = 735
End
Begin VB.Label Label1
Caption = "商品名称"
Height = 255
Index = 4
Left = 2160
TabIndex = 27
Top = 360
Width = 735
End
Begin VB.Label Label1
Caption = "数 量"
Height = 255
Index = 5
Left = 2160
TabIndex = 26
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "单 位"
Height = 255
Index = 6
Left = 2160
TabIndex = 25
Top = 1440
Width = 735
End
Begin VB.Label Label1
Caption = "单 价"
Height = 255
Index = 7
Left = 2160
TabIndex = 24
Top = 1920
Width = 735
End
Begin VB.Label Label1
Caption = "收款合计"
Height = 255
Index = 8
Left = 4200
TabIndex = 23
Top = 360
Width = 735
End
Begin VB.Label Label1
Caption = "收银编号"
Height = 255
Index = 9
Left = 120
TabIndex = 22
Top = 360
Width = 735
End
Begin VB.Label Label1
Caption = "客户全称"
Height = 255
Index = 10
Left = 4200
TabIndex = 21
Top = 1440
Width = 735
End
Begin VB.Label Label1
Caption = "备 注"
Height = 255
Index = 11
Left = 4200
TabIndex = 20
Top = 2400
Width = 735
End
Begin VB.Label Label1
Caption = "销售时间"
Height = 375
Index = 12
Left = 120
TabIndex = 19
Top = 2400
Width = 735
End
Begin VB.Label Label1
Caption = "金额小计"
Height = 255
Index = 13
Left = 2160
TabIndex = 18
Top = 2400
Width = 735
End
Begin VB.Label Label1
Caption = "票 号"
Height = 255
Index = 14
Left = 4200
TabIndex = 17
Top = 1920
Width = 735
End
End
Attribute VB_Name = "test22"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
test1.Adodc2.RecordSource = "insert into 销售信息表 values(" + Text1(0).Text + "," + Text1(1).Text + "," + Text1(2).Text + "," + Text1(3).Text + "," + Text1(4).Text + "," + Text1(5).Text + "," + Text1(6).Text + "," + Text1(7).Text + "" + Text1(8).Text + "," + Text1(9).Text + "," + Text1(10).Text + "," + Text1(11).Text + "," + Text1(12).Text + "," + Text1(13).Text + "," + Text1(14).Text + ")"
With test1.Adodc2.Recordset
.AddNew
If .RecordCount > 0 Then
.Fields("收银员编号") = Text1(0).Text
.Fields("商品编号") = Text1(1).Text
.Fields("客户编号") = Text1(2).Text
.Fields("销售日期") = Text1(3).Text
.Fields("销售时间") = Text1(4).Text
.Fields("商品名称") = Text1(5).Text
.Fields("数量") = Text1(6).Text
.Fields("单位") = Text1(7).Text
.Fields("单价") = Text1(8).Text
.Fields("金额小计") = Text1(9).Text
.Fields("收款合计") = Text1(10).Text
.Fields("累计余额") = Text1(11).Text
.Fields("客户全称") = Text1(12).Text
.Fields("票号") = Text1(13).Text
.Fields("备注") = Text1(14).Text
.Update
End If
End With
MsgBox "数据保存成功!!", 32, "销售管理系统"
test22.Visible = False
End Sub
Private Sub Command2_Click()
test22.Visible = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -