📄 frm_thxx_cx.frm
字号:
EndProperty
BeginProperty Column04
ColumnWidth = 2085.166
EndProperty
BeginProperty Column05
ColumnWidth = 2085.166
EndProperty
BeginProperty Column06
ColumnWidth = 2085.166
EndProperty
BeginProperty Column07
ColumnWidth = 2085.166
EndProperty
BeginProperty Column08
ColumnWidth = 2085.166
EndProperty
BeginProperty Column09
ColumnWidth = 2085.166
EndProperty
BeginProperty Column10
ColumnWidth = 2085.166
EndProperty
BeginProperty Column11
ColumnWidth = 2085.166
EndProperty
BeginProperty Column12
ColumnWidth = 2085.166
EndProperty
BeginProperty Column13
ColumnWidth = 2085.166
EndProperty
EndProperty
End
Begin VB.Frame Frame1
Height = 1600
Left = 0
TabIndex = 0
Top = 0
Width = 6855
Begin VB.Frame Frame3
Caption = "日期查询"
ForeColor = &H00C000C0&
Height = 615
Left = 120
TabIndex = 6
Top = 900
Width = 6615
Begin VB.CommandButton Command4
Caption = "取消"
Height = 350
Left = 5640
TabIndex = 13
Top = 200
Width = 855
End
Begin VB.CommandButton Command2
Caption = "查询"
Height = 350
Left = 4680
TabIndex = 10
Top = 200
Width = 855
End
Begin MSComCtl2.DTPicker DT1
Height = 300
Left = 2760
TabIndex = 9
Top = 195
Width = 1815
_ExtentX = 3201
_ExtentY = 529
_Version = 393216
Format = 54657025
CurrentDate = 38245
End
Begin VB.ComboBox Combo4
Height = 300
ItemData = "frm_thxx_cx.frx":0015
Left = 1800
List = "frm_thxx_cx.frx":002B
Style = 2 'Dropdown List
TabIndex = 8
Top = 200
Width = 855
End
Begin VB.ComboBox Combo3
Height = 300
ItemData = "frm_thxx_cx.frx":004C
Left = 120
List = "frm_thxx_cx.frx":0059
Style = 2 'Dropdown List
TabIndex = 7
Top = 200
Width = 1575
End
End
Begin VB.Frame Frame2
Caption = "普通查询"
ForeColor = &H00C000C0&
Height = 615
Left = 120
TabIndex = 1
Top = 200
Width = 6615
Begin VB.CommandButton Command3
Caption = "取消"
Height = 350
Left = 5640
TabIndex = 12
Top = 200
Width = 855
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 350
Left = 4680
TabIndex = 5
Top = 200
Width = 855
End
Begin VB.TextBox Text1
Height = 300
Left = 2760
TabIndex = 4
Top = 200
Width = 1815
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frm_thxx_cx.frx":007B
Left = 1800
List = "frm_thxx_cx.frx":0091
Style = 2 'Dropdown List
TabIndex = 3
Top = 200
Width = 855
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frm_thxx_cx.frx":00B2
Left = 120
List = "frm_thxx_cx.frx":00C8
Style = 2 'Dropdown List
TabIndex = 2
Top = 200
Width = 1575
End
End
End
End
Attribute VB_Name = "frm_thxx_cx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, a
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
Else
End If
End Sub
Private Sub Combo2_Click()
If Combo2.Text <> " Like" Then
i = 0
ElseIf Combo2.Text = " Like" Then
i = 1
Else
End If
Text1.SetFocus
End Sub
Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text1.SetFocus
Else
End If
End Sub
Private Sub Combo3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo4.SetFocus
Else
End If
End Sub
Private Sub Combo4_Click()
If Combo4.Text <> " Like" Then
i = 0
ElseIf Combo4.Text = " Like" Then
i = 1
Else
End If
Text1.SetFocus
End Sub
Private Sub Combo4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DT1.SetFocus
Else
End If
End Sub
Private Sub Command1_Click()
If Combo1.Text = "" Or Combo2.Text = "" Or Text1.Text = "" Then
MsgBox "输入或选择的内容不能为空值", 48, "采购管理系统"
ElseIf Combo1.Text = "数量" Or Combo1.Text = "单号" Or Combo1.Text = "退货单号" Then
If Not IsNumeric(Text1.Text) Then
Text1.Text = ""
Text1.SetFocus
Else
a = Text1.Text
If i = 0 Then
Adodc1.RecordSource = "select * from Table_thb where " + Combo1.Text + " " + Combo2.Text + " '" + a + "'"
Adodc1.Refresh
ElseIf i = 1 Then
Adodc1.RecordSource = "select * from Table_thb where " + Combo1.Text + " like '%" + a + "%'"
Adodc1.Refresh
Else
End If
End If
Else
a = Text1.Text
If i = 0 Then
Adodc1.RecordSource = "select * from Table_thb where " + Combo1.Text + " " + Combo2.Text + " '" + a + "'"
Adodc1.Refresh
ElseIf i = 1 Then
Adodc1.RecordSource = "select * from Table_thb where " + Combo1.Text + " like '%" + a + "%'"
Adodc1.Refresh
Else
End If
End If
End Sub
Private Sub Command2_Click()
If Combo3.Text = "" Or Combo4.Text = "" Then
MsgBox "输入或选择的内容不能为空值", 48, "采购管理系统"
Else
a = DT1.Value
If i = 0 Then
Adodc1.RecordSource = "select * from Table_thb where " + Combo3.Text + " " + Combo4.Text + " '" + Str(a) + "'"
Adodc1.Refresh
ElseIf i = 1 Then
Adodc1.RecordSource = "select * from Table_thb where " + Combo3.Text + " like '%" + Str(a) + "%'"
Adodc1.Refresh
Else
End If
End If
End Sub
Private Sub Command3_Click()
Combo1.SetFocus
Text1.Text = ""
Adodc1.RecordSource = "select * from Table_thb order by 退货单号"
Adodc1.Refresh
End Sub
Private Sub Command4_Click()
Combo3.SetFocus
Adodc1.RecordSource = "select * from Table_thb order by 退货单号"
Adodc1.Refresh
End Sub
Private Sub DT1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command2_Click
Else
End If
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
DT1.Value = Date
frm_main.StatusBar1.Panels(1).Text = " 当前操作: " & Me.Caption
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command1_Click
Else
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.StatusBar1.Panels(1).Text = " 吉林省明日科技有限公司"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -