📄 czsp.frm
字号:
VERSION 5.00
Begin VB.Form czsp
Caption = "查找商品"
ClientHeight = 2475
ClientLeft = 3990
ClientTop = 2940
ClientWidth = 4860
Icon = "czsp.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2475
ScaleWidth = 4860
Begin VB.Frame Frame2
Height = 2415
Left = 0
TabIndex = 0
Top = 0
Width = 4815
Begin VB.Frame Frame1
Caption = "查询主题"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 2055
Left = 120
TabIndex = 5
Top = 240
Width = 2055
Begin VB.OptionButton Option1
Caption = "编号"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Index = 0
Left = 360
TabIndex = 8
Top = 480
Width = 855
End
Begin VB.OptionButton Option1
Caption = "商品名称"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Index = 1
Left = 360
TabIndex = 7
Top = 960
Width = 1335
End
Begin VB.OptionButton Option1
Caption = "供货单位"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Index = 2
Left = 360
TabIndex = 6
Top = 1440
Width = 1455
End
End
Begin VB.CommandButton Command2
Caption = "取消(&C)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3600
TabIndex = 4
Top = 1680
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2280
TabIndex = 3
Top = 1680
Width = 1095
End
Begin VB.Frame Frame3
Caption = "查询内容"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 975
Left = 2400
TabIndex = 1
Top = 360
Width = 2175
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 240
TabIndex = 2
Top = 360
Width = 1695
End
End
End
End
Attribute VB_Name = "czsp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public a As Integer
Private Sub Command1_Click()
Dim oIndex As Integer
If Option1(0).Value = True Then oIndex = 0
If Option1(1).Value = True Then oIndex = 1
If Option1(2).Value = True Then oIndex = 2
'If Option1(3).Value = True Then oIndex = 3
'查找职员
Select Case oIndex
Case 0
spxx.Data1.RecordSource = "select * from spxx where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
Case 1
spxx.Data1.RecordSource = "select * from spxx where " & "spmc" & " = '" & Trim(Text1.Text) & "'"
Case 2
spxx.Data1.RecordSource = "select * from spxx where " & "ghs" & " = '" & Trim(Text1.Text) & "'"
'Case 3
' spxx.Data1.RecordSource = "select * from zyzl where " & "szbm" & " = '" & Trim(Text1.Text) & "'"
End Select
Unload Me
spxx.Data1.Refresh
'zyxx.Data1.Recordset.MoveFirst
If spxx.Data1.Recordset.BOF = True Then
MsgBox "没有找到符合条件的记录。", vbInformation, "提示"
Unload Me
spxx.Data1.RecordSource = "select * from spxx"
spxx.Data1.Refresh
spxx.Show
Else
spxx.Show
End If
End Sub
Private Sub Command2_Click()
spxx.Data1.RecordSource = "select * from spxx"
spxx.Data1.Refresh
spxx.Show
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -