selset.frm
来自「一个商业软件的源码」· FRM 代码 · 共 1,078 行 · 第 1/3 页
FRM
1,078 行
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "selset.frx":28AA
Caption = "并且ADD(&A)"
BackColor = 16761024
HoverColor = 8454143
End
Begin MSDataListLib.DataCombo DataCombo1
Height = 330
Left = 4680
TabIndex = 3
Top = 1200
Width = 1575
_ExtentX = 2778
_ExtentY = 582
_Version = 393216
Appearance = 0
BackColor = 16761087
Text = ""
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 1800
Top = 3240
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 4
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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
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.Label Label5
BackStyle = 0 'Transparent
Caption = "排序"
Height = 255
Left = 4080
TabIndex = 20
Top = 2160
Width = 735
End
Begin VB.Shape Shape5
BorderColor = &H00808000&
BorderWidth = 3
FillColor = &H00C0E0FF&
FillStyle = 0 'Solid
Height = 2175
Left = 120
Shape = 4 'Rounded Rectangle
Top = 2760
Width = 6375
End
Begin VB.Shape Shape4
FillColor = &H00C0E0FF&
FillStyle = 0 'Solid
Height = 4215
Left = 6600
Shape = 4 'Rounded Rectangle
Top = 720
Width = 1455
End
Begin VB.Shape Shape3
FillColor = &H0080C0FF&
FillStyle = 0 'Solid
Height = 855
Left = 120
Shape = 4 'Rounded Rectangle
Top = 1800
Width = 6375
End
Begin VB.Image Image1
Height = 480
Left = 240
Picture = "selset.frx":28C6
Top = 120
Width = 480
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "维实销售查询系统"
BeginProperty Font
Name = "黑体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Left = 2640
TabIndex = 5
Top = 240
Width = 2775
End
Begin VB.Shape Shape2
FillColor = &H00008080&
FillStyle = 0 'Solid
Height = 495
Left = 120
Shape = 4 'Rounded Rectangle
Top = 120
Width = 7935
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "内容(&V)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4920
TabIndex = 4
Top = 840
Width = 1215
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "关系(&P)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3000
TabIndex = 2
Top = 840
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "名称(&N)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 1
Top = 840
Width = 975
End
Begin VB.Shape Shape1
FillColor = &H00C0E0FF&
FillStyle = 0 'Solid
Height = 975
Left = 120
Shape = 4 'Rounded Rectangle
Top = 720
Width = 6375
End
End
End
Attribute VB_Name = "frmselect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Public jj As String
Public CC As String
Private str As String
Private kk As String
Public zen As Boolean
Private sql As String
Private Sub Combo1_Change()
DataCombo1.ListField = ""
End Sub
Private Sub Command1_Click()
End Sub
Private Sub CurtButton1_Click()
Dim str As String
Dim i As Integer
Dim J As Integer
For i = 0 To Adodc1.Recordset.Fields.Count - 1
If Adodc1.Recordset.Fields(i).name = Combo2.Text Then J = i
str = ConvType(Adodc1.Recordset.Fields(J).Type)
Next i
Select Case str
Case "Text"
If Combo2.Text = "Like" Then
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & " " & Combo2.Text & " " & " '" & "%" & DataCombo1.Text & "%" & "'" & ") "
Else
kk = kk & "AND" & "(" & Combo1.Text & " " & Combo2.Text & " " & " '" & "%" & DataCombo1.Text & "%" & "'" & ")"
End If
Else
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & Combo2.Text & " '" & DataCombo1.Text & "'" & ") "
Else
kk = kk & "AND" & "(" & Combo1.Text & Combo2.Text & " '" & DataCombo1.Text & "'" & ")"
End If
End If
Case "Date/Time"
If Combo2.Text = "Like" Then
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & " " & Combo2.Text & " " & "'" & "%" & DataCombo1.Text & "%" & "'" & ") "
Else
kk = kk & "AND" & "(" & Combo1.Text & " " & Combo2.Text & " " & " #" & DataCombo1.Text & "#" & ")"
End If
Else
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & Combo2.Text & "#" & DataCombo1.Text & "#" & ") "
Else
kk = kk & "AND" & "(" & Combo1.Text & Combo2.Text & "# " & DataCombo1.Text & "#" & ")"
End If
End If
End Select
Text1.Text = " where " & kk
End Sub
Private Sub CurtButton10_Click()
List2.Clear
Dim a As Integer
Dim i As Integer
a = List1.ListCount - 1
For i = 0 To a
List1.ListIndex = i
List2.AddItem List1.Text
Next i
CurtButton12.Enabled = True
'Combo3.Clear
'Combo3.AddItem "(" & "无" & ")"
End Sub
Private Sub CurtButton11_Click()
'Combo3.Clear
'Combo3.AddItem "(" & "无" & ")"
Dim a As Integer
Dim i As Integer
a = List2.ListCount - 1
For i = 0 To a
If List2.Selected(i) = True Then
List2.RemoveItem (i)
Exit Sub
End If
Next i
If List2.ListCount = 0 Then
UpDown1.Visible = False
End If
End Sub
Private Sub CurtButton12_Click()
List2.Clear
'Combo3.Clear
'Combo3.AddItem "(" & "无" & ")"
UpDown1.Visible = False
End Sub
Private Sub CurtButton2_Click()
Dim str As String
Dim i As Integer
Dim J As Integer
For i = 0 To Adodc1.Recordset.Fields.Count - 1
If Adodc1.Recordset.Fields(i).name = Combo1.Text Then J = i
str = ConvType(Adodc1.Recordset.Fields(J).Type)
Next i
Select Case str
Case "Text"
If Combo1.Text = "Like" Then
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & " " & Combo2.Text & " " & " '" & "%" & DataCombo1.Text & "%" & "'" & ") "
Else
kk = kk & "OR" & "(" & Combo1.Text & " " & Combo2.Text & " " & " '" & "%" & DataCombo1.Text & "%" & "'" & ")"
End If
Else
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & Combo2.Text & " '" & DataCombo1.Text & "'" & ") "
Else
kk = kk & "OR" & "(" & Combo1.Text & Combo2.Text & " '" & DataCombo1.Text & "'" & ")"
End If
End If
Case "Date/Time"
If Combo1.Text = "Like" Then
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & " " & Combo2.Text & " " & " %" & "#" & DataCombo1.Text & "#" & "%" & ") "
Else
kk = kk & "OR" & "(" & Combo1.Text & " " & Combo2.Text & " " & " %" & "#" & DataCombo1.Text & "#" & "%" & ")"
End If
Else
If Text1.Text = "" Then
kk = kk & "(" & Combo1.Text & Combo2.Text & " #" & DataCombo1.Text & "#" & ") "
Else
kk = kk & "OR" & "(" & Combo1.Text & Combo2.Text & " #" & DataCombo1.Text & "#" & ")"
End If
End If
End Select
Text1.Text = " where " & kk
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?