📄 main_cxtj_xstdcx.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form main_cxtj_xstdcx
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "查询统计——【销售退货查询】"
ClientHeight = 4665
ClientLeft = 345
ClientTop = 2400
ClientWidth = 13995
Icon = "main_cxtj_xstdcx.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4665
ScaleWidth = 13995
StartUpPosition = 1 'CenterOwner
Begin VB.Frame Frame1
Caption = "请选择查询条件"
Height = 630
Left = 60
TabIndex = 7
Top = 75
Width = 6315
Begin VB.TextBox Text1
BackColor = &H80000000&
Height = 300
Left = 2085
TabIndex = 9
Top = 210
Width = 4125
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "main_cxtj_xstdcx.frx":000C
Left = 120
List = "main_cxtj_xstdcx.frx":000E
Style = 2 'Dropdown List
TabIndex = 8
Top = 210
Width = 1965
End
End
Begin VB.Frame Frame2
Caption = "Frame2"
Height = 1650
Left = -465
TabIndex = 3
Top = 2130
Visible = 0 'False
Width = 1320
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 345
Left = 90
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "xstd"
Top = 180
Width = 1140
End
Begin VB.TextBox rq1
Height = 270
Left = 90
TabIndex = 5
Top = 855
Width = 1035
End
Begin VB.TextBox rq2
Height = 270
Left = 90
TabIndex = 4
Top = 1140
Width = 1035
End
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 435
Left = 6480
TabIndex = 2
Top = 120
Width = 1245
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 435
Left = 9600
TabIndex = 1
Top = 120
Width = 1245
End
Begin VB.CommandButton Command2
Caption = "删除"
Height = 435
Left = 8040
TabIndex = 0
Top = 120
Width = 1245
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "main_cxtj_xstdcx.frx":0010
Height = 3615
Left = 45
OleObjectBlob = "main_cxtj_xstdcx.frx":0024
TabIndex = 6
Top = 750
Width = 13890
End
End
Attribute VB_Name = "main_cxtj_xstdcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
'向combo1添加查询项目列表
Combo1.AddItem ("商品名称")
Combo1.AddItem ("批号")
Combo1.AddItem ("票号")
Combo1.ListIndex = 0
'查询销售退货信息
Data1.RecordSource = "select * from xstd where ((xstd.日期 between " + Chr(35) + rq1.Text + Chr(35) + "and " + Chr(35) + rq2.Text + Chr(35) + "))"
Data1.Refresh
End Sub
Private Sub Form_Load() '自动识别数据库路径
Data1.DatabaseName = App.Path & "\yyjxc.mdb"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub Command1_Click() '查询销售退货信息
Data1.RecordSource = "select * from xstd where ((xstd.日期 between " + Chr(35) + rq1.Text + Chr(35) + "and " + Chr(35) + rq2.Text + Chr(35) + ")and(xstd." & Combo1.Text & " " & "like " + Chr(34) + Text1.Text + "*" + Chr(34) + "))"
Data1.Refresh
End Sub
Private Sub Command2_Click() '删除销售退货信息
On Error Resume Next
Data1.Recordset.Delete
Data1.Refresh
End Sub
Private Sub Command3_Click()
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -