?? 銷售查詢.frm
字號:
VERSION 5.00
Begin VB.Form main_cxtj_xscx
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "查詢統計——【銷售查詢】"
ClientHeight = 4500
ClientLeft = 345
ClientTop = 2400
ClientWidth = 10380
Icon = "銷售查詢.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4500
ScaleWidth = 10380
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Caption = "請選擇查詢條件"
Height = 630
Left = 60
TabIndex = 7
Top = 75
Width = 6375
Begin VB.TextBox Text1
BackColor = &H80000000&
Height = 300
Left = 2130
TabIndex = 9
Top = 210
Width = 4125
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "銷售查詢.frx":000C
Left = 120
List = "銷售查詢.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 = "D:\VB數據庫開發實例解析\程序\醫藥進銷存管理系統\yyjxc.mdb"
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 90
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "xsd"
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 = 6555
TabIndex = 2
Top = 180
Width = 1245
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 435
Left = 9075
TabIndex = 1
Top = 180
Width = 1245
End
Begin VB.CommandButton Command2
Caption = "刪除"
Height = 435
Left = 7815
TabIndex = 0
Top = 180
Width = 1245
End
Begin VB.PictureBox DBGrid1
Height = 3615
Left = 45
ScaleHeight = 3555
ScaleWidth = 10230
TabIndex = 6
Top = 750
Width = 10290
End
End
Attribute VB_Name = "main_cxtj_xscx"
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 xsd where ((xsd.日期 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 xsd where ((xsd.日期 between " + Chr(35) + rq1.Text + Chr(35) + "and " + Chr(35) + rq2.Text + Chr(35) + ")and(xsd." & 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 + -