?? frmxscx.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmXSCX
BorderStyle = 1 'Fixed Single
Caption = "銷售查詢"
ClientHeight = 6435
ClientLeft = 45
ClientTop = 435
ClientWidth = 10410
Icon = "frmXSCX.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmXSCX.frx":29C12
ScaleHeight = 6435
ScaleWidth = 10410
StartUpPosition = 2 '屏幕中心
Begin MSDataGridLib.DataGrid dgdXSCX
Bindings = "frmXSCX.frx":3C714
Height = 3975
Left = 0
TabIndex = 10
Top = 2520
Width = 10455
_ExtentX = 18441
_ExtentY = 7011
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 5640
TabIndex = 9
Top = 2040
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "查詢"
Height = 375
Left = 3000
TabIndex = 8
Top = 2040
Width = 1455
End
Begin MSAdodcLib.Adodc adoXSCX
Height = 375
Left = 8640
Top = 1920
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Password=ecc;Persist Security Info=True;User ID=sa;Initial Catalog=PetrolStation System;Data Source=(local)"
OLEDBString = "Provider=SQLOLEDB.1;Password=ecc;Persist Security Info=True;User ID=sa;Initial Catalog=PetrolStation System;Data Source=(local)"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from PS_Sales"
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.Frame Frame1
Caption = "請選擇查詢條件"
Height = 1695
Left = 120
TabIndex = 0
Top = 120
Width = 10095
Begin VB.ComboBox Combo1
Height = 300
Left = 240
TabIndex = 7
Top = 240
Width = 2535
End
Begin VB.ComboBox Combo2
Height = 300
Left = 3000
TabIndex = 6
Top = 240
Width = 1215
End
Begin VB.ComboBox Combo3
Height = 300
Left = 1920
TabIndex = 5
Top = 720
Width = 1695
End
Begin VB.ComboBox Combo4
Height = 300
Left = 240
TabIndex = 4
Top = 1200
Width = 2535
End
Begin VB.ComboBox Combo5
Height = 300
Left = 3000
TabIndex = 3
Top = 1200
Width = 1215
End
Begin VB.TextBox Text1
Height = 270
Left = 4560
TabIndex = 2
Top = 240
Width = 5295
End
Begin VB.TextBox Text2
Height = 270
Left = 4560
TabIndex = 1
Top = 1200
Width = 5295
End
End
End
Attribute VB_Name = "frmXSCX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo myerr
If Trim(Text1.Text) = "" Or Trim(Text2.Text) = "" Then
If MsgBox("請輸入查詢條件!", vbInformation, "提示") Then GoTo myerr
End If
adoXSCX.CommandType = adCmdText
adoXSCX.RecordSource = "select * from PS_Sales where " & Trim(Combo1.Text) _
& Trim(Combo2.Text) & " '" & Trim(Text1.Text) & "'" & " " _
& Trim(Combo3.Text) & " " & Trim(Combo4.Text) & _
Trim(Combo5.Text) & "'" & Trim(Text2.Text) & "'"
adoXSCX.Refresh
myerr:
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
adoXSCX.CommandType = adCmdText
adoXSCX.RecordSource = "select * from PS_Sales"
adoXSCX.Refresh
Combo1.AddItem ("油品名稱")
Combo1.AddItem ("客戶姓名")
Combo1.AddItem ("經(jīng)手人")
Combo1.AddItem ("票號")
Combo1.AddItem ("數(shù)量")
Combo1.ListIndex = 0
Combo2.AddItem ("=")
Combo2.AddItem (">")
Combo2.AddItem (">=")
Combo2.AddItem ("<")
Combo2.AddItem ("<=")
Combo2.AddItem ("<>")
Combo2.ListIndex = 0
Combo3.AddItem ("And")
Combo3.AddItem ("Or")
Combo4.AddItem ("油品名稱")
Combo4.AddItem ("客戶")
Combo4.AddItem ("經(jīng)手人")
Combo4.AddItem ("票號")
Combo4.AddItem ("數(shù)量")
Combo4.ListIndex = 0
Combo5.AddItem ("=")
Combo5.AddItem (">")
Combo5.AddItem (">=")
Combo5.AddItem ("<")
Combo5.AddItem ("<=")
Combo5.AddItem ("<>")
Combo5.ListIndex = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmMain.Enabled = True
frmMain.Show
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -