📄 spxsd.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "Msadodc.OCX"
Begin VB.Form spxsd
Caption = "水票销售单"
ClientHeight = 5265
ClientLeft = 60
ClientTop = 345
ClientWidth = 7440
LinkTopic = "Form1"
Picture = "spxsd.frx":0000
ScaleHeight = 5265
ScaleWidth = 7440
StartUpPosition = 2 '屏幕中心
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 615
Left = 0
TabIndex = 15
Top = 0
Width = 7440
_ExtentX = 13123
_ExtentY = 1085
ButtonWidth = 1773
ButtonHeight = 926
Appearance = 1
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 3
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "添加"
Key = "tj"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存"
Key = "ff"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = " 退出 "
Key = "tc"
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 495
Left = 0
TabIndex = 13
Top = 4770
Width = 7440
_ExtentX = 13123
_ExtentY = 873
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
Object.Width = 1764
MinWidth = 1764
TextSave = "0:20"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
TextSave = "2006-06-02"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 145030
MinWidth = 145030
Text = "水票销售"
TextSave = "水票销售"
EndProperty
EndProperty
End
Begin VB.Frame Frame1
BackColor = &H00FF8080&
Height = 3615
Left = 0
TabIndex = 0
Top = 720
Width = 7335
Begin VB.ComboBox Combo1
DataField = "销售日期"
DataSource = "Adodc1"
Enabled = 0 'False
Height = 300
Left = 4320
TabIndex = 16
Text = "Combo1"
Top = 840
Width = 1935
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 7320
Top = 3240
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Password=515515;Persist Security Info=True;User ID=sa;Data Source=login"
OLEDBString = "Provider=MSDASQL.1;Password=515515;Persist Security Info=True;User ID=sa;Data Source=login"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from spxs"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text6
DataField = "水票起始号"
DataSource = "Adodc1"
Height = 375
Left = 1200
TabIndex = 12
Text = "Text6"
Top = 1440
Width = 1815
End
Begin VB.TextBox Text2
DataField = "总金额"
DataSource = "Adodc1"
Enabled = 0 'False
Height = 375
Index = 3
Left = 4320
TabIndex = 10
Top = 1440
Width = 1935
End
Begin VB.TextBox Text2
DataField = "数量"
DataSource = "Adodc1"
Height = 375
Index = 0
Left = 1200
TabIndex = 9
Top = 840
Width = 1815
End
Begin VB.ComboBox Combo3
DataField = "水票名称"
DataSource = "Adodc1"
Height = 300
Index = 0
Left = 1200
TabIndex = 8
Text = "Combo3"
Top = 360
Width = 1815
End
Begin VB.TextBox Text7
DataField = "备注"
DataSource = "Adodc1"
Height = 855
Left = 1200
TabIndex = 7
Top = 2280
Width = 5055
End
Begin VB.TextBox 水票销售单
DataField = "单价"
DataSource = "Adodc1"
Height = 375
Left = 4320
TabIndex = 3
Top = 240
Width = 1935
End
Begin VB.Label Label12
BackStyle = 0 'Transparent
Caption = "销售日期"
Height = 375
Left = 3480
TabIndex = 14
Top = 960
Width = 855
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "销售数量"
Height = 375
Index = 0
Left = 240
TabIndex = 11
Top = 840
Width = 855
End
Begin VB.Label Label17
BackStyle = 0 'Transparent
Caption = "备 注"
Height = 375
Left = 360
TabIndex = 6
Top = 2520
Width = 735
End
Begin VB.Label Label13
BackStyle = 0 'Transparent
Caption = "水票起始号"
Height = 495
Left = 120
TabIndex = 5
Top = 1560
Width = 1095
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "总金额"
Height = 375
Left = 3600
TabIndex = 4
Top = 1440
Width = 735
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "单 价"
Height = 375
Left = 3600
TabIndex = 2
Top = 360
Width = 735
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "水票名称"
Height = 375
Left = 240
TabIndex = 1
Top = 360
Width = 975
End
End
End
Attribute VB_Name = "spxsd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub 查询_Click()
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
End Sub
Private Sub Form_Load()
Dim msgtext1 As String
Dim txtsql1 As String
Dim mrc1 As ADODB.Recordset
txtsql1 = "select 水票名称 from waters"
Set mrc1 = ExecuteSQL(txtsql1, msgtext1)
If mrc1.EOF = False Then
Do While Not mrc1.EOF
Combo3(0).AddItem Trim(mrc1.Fields(0))
mrc1.MoveNext
Loop
End If
mrc1.Close
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
On Error Resume Next
Adodc1.Recordset.AddNew
Adodc1.Recordset("数量") = ""
Adodc1.Recordset("销售日期") = Format(Date, "yy-mm-dd")
Adodc1.Recordset("水票名称") = ""
Adodc1.Recordset("水票起始号") = ""
Adodc1.Recordset("总金额") = ""
Adodc1.Recordset("单价") = ""
Adodc1.Recordset("备注") = ""
Adodc1.Recordset.MoveLast
Case 2
MsgBox "您输入的信息已经保存!", vbOKOnly, "提示"
Case 3
Unload Me
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -