?? frmyzlfind.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmYZLFind
Caption = "查找"
ClientHeight = 5655
ClientLeft = 2970
ClientTop = 2460
ClientWidth = 10695
LinkTopic = "Form2"
MDIChild = -1 'True
ScaleHeight = 5655
ScaleWidth = 10695
Begin VB.CommandButton cmdBack
Caption = "離 開"
Height = 375
Left = 360
TabIndex = 29
Top = 4800
Width = 975
End
Begin VB.CommandButton cmdFind
Caption = "查 找"
Height = 375
Left = 360
TabIndex = 28
Top = 4080
Width = 975
End
Begin VB.Frame Frame1
Caption = "精確查找"
Height = 2055
Left = 1680
TabIndex = 5
Top = 480
Width = 8175
Begin VB.OptionButton optID
Caption = "Option3"
Height = 255
Left = 360
TabIndex = 13
Top = 480
Width = 255
End
Begin VB.OptionButton optUPC
Caption = "Option4"
Height = 255
Left = 4440
TabIndex = 12
Top = 480
Width = 255
End
Begin VB.TextBox txtID
BackColor = &H8000000F&
Height = 375
Left = 1680
TabIndex = 11
Top = 390
Width = 1935
End
Begin VB.TextBox txtUPC
BackColor = &H8000000F&
Height = 375
Left = 5640
TabIndex = 10
Top = 360
Width = 1935
End
Begin VB.OptionButton optGoodsname
Caption = "Option3"
Height = 255
Left = 360
TabIndex = 9
Top = 1320
Width = 255
End
Begin VB.OptionButton optArea
Caption = "Option4"
Height = 255
Left = 4440
TabIndex = 8
Top = 1320
Width = 255
End
Begin VB.TextBox txtGoodsname
BackColor = &H8000000F&
Height = 375
Left = 1680
TabIndex = 7
Top = 1200
Width = 1935
End
Begin VB.TextBox txtArea
BackColor = &H8000000F&
Height = 375
Left = 5640
TabIndex = 6
Top = 1200
Width = 1935
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "商品號(hào)"
Height = 180
Left = 840
TabIndex = 17
Top = 480
Width = 540
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "國(guó)際碼"
Height = 180
Left = 4920
TabIndex = 16
Top = 480
Width = 540
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "商品名"
Height = 180
Left = 840
TabIndex = 15
Top = 1320
Width = 540
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "產(chǎn)地"
Height = 180
Left = 4920
TabIndex = 14
Top = 1320
Width = 360
End
End
Begin VB.Frame Frame2
Caption = "模糊查找"
Height = 2295
Left = 1680
TabIndex = 4
Top = 3000
Width = 8295
Begin VB.TextBox txtM2
Height = 375
Left = 3840
MaxLength = 6
TabIndex = 27
Top = 1320
Width = 1215
End
Begin VB.TextBox txtM1
Height = 375
Left = 1680
MaxLength = 6
TabIndex = 26
Top = 1320
Width = 1215
End
Begin VB.TextBox txtK2
Height = 375
Left = 3840
MaxLength = 6
TabIndex = 21
Top = 600
Width = 1215
End
Begin VB.TextBox txtK1
Height = 375
Left = 1680
MaxLength = 6
TabIndex = 19
Top = 600
Width = 1215
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "之間"
Height = 180
Left = 5520
TabIndex = 25
Top = 1440
Width = 360
End
Begin VB.Label Label14
Caption = "與"
Height = 255
Left = 3240
TabIndex = 24
Top = 1440
Width = 255
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "賣場(chǎng)數(shù)量在"
Height = 180
Left = 360
TabIndex = 23
Top = 1440
Width = 900
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "之間"
Height = 180
Left = 5520
TabIndex = 22
Top = 720
Width = 360
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "與"
Height = 180
Left = 3240
TabIndex = 20
Top = 720
Width = 180
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "庫(kù)存數(shù)量在"
Height = 180
Left = 360
TabIndex = 18
Top = 720
Width = 900
End
End
Begin VB.OptionButton Option2
Caption = "Option2"
Height = 255
Left = 360
TabIndex = 2
Top = 3000
Width = 255
End
Begin VB.OptionButton Option1
Caption = "Option1"
Height = 255
Left = 360
TabIndex = 0
Top = 480
Width = 255
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "模糊查找"
Height = 180
Left = 720
TabIndex = 3
Top = 3000
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "精確查找"
Height = 180
Left = 720
TabIndex = 1
Top = 480
Width = 720
End
End
Attribute VB_Name = "frmYZLFind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdBack_Click()
Unload Me
End Sub
Private Sub cmdFind_Click()
Dim strsql As String
If optID.Value = True Then '根據(jù)商品號(hào)查詢
If txtId.Text = "" Then
MsgBox "請(qǐng)輸入查詢條件!", vbExclamation
txtId.SetFocus
Exit Sub
End If
strsql = "select * from t_goods where goodsid='g" & Trim(txtId.Text) & "'"
Dblink.executeSQL (strsql)
If Dblink.rs.RecordCount = 0 Then
MsgBox "對(duì)不起,您所查找的商品不存在,請(qǐng)重新輸入!", vbInformation
txtId.SetFocus
txtId.SelStart = 0
txtId.SelLength = 9
Exit Sub
Else
Call YZLRefMSHFlexGrid(frmYZLGoods, "select goodsid '商品號(hào)',goodsname '商品名稱',upc '國(guó)際碼',brand '品牌',typename '商品類型',spec '商品規(guī)格',unit '銷售單位',store '庫(kù)存',area '產(chǎn)地' from t_goods where goodsid='g" & Trim(txtId.Text) & "'")
Unload Me
Exit Sub
End If
End If
If optUPC.Value = True Then '根據(jù)UPC碼查詢
If txtUPC.Text = "" Then
MsgBox "請(qǐng)輸入查詢條件!", vbExclamation
txtUPC.SetFocus
Exit Sub
End If
strsql = "select * from t_goods where upc='" & Trim(txtUPC.Text) & "'"
Dblink.executeSQL (strsql)
If Dblink.rs.RecordCount = 0 Then
MsgBox "對(duì)不起,您所查找的商品不存在,請(qǐng)重新輸入!", vbInformation
txtUPC.SetFocus
txtUPC.SelStart = 0
txtUPC.SelLength = 15
Exit Sub
Else
Call YZLRefMSHFlexGrid(frmYZLGoods, "select goodsid '商品號(hào)',goodsname '商品名稱',upc '國(guó)際碼',brand '品牌',typename '商品類型',spec '商品規(guī)格',unit '銷售單位',store '庫(kù)存',area '產(chǎn)地' from t_goods where upc='" & Trim(txtUPC.Text) & "'")
Unload Me
Exit Sub
End If
End If
If optGoodsname.Value = True Then '根據(jù)商品名稱模糊查詢
If txtGoodsName.Text = "" Then
MsgBox "請(qǐng)輸入查詢條件!", vbExclamation
txtGoodsName.SetFocus
Exit Sub
End If
strsql = "select * from t_goods where goodsname like ('%" & Trim(txtGoodsName.Text) & "%')"
Dblink.executeSQL (strsql)
If Dblink.rs.RecordCount = 0 Then
MsgBox "對(duì)不起,您所查找的商品不存在,請(qǐng)重新輸入!", vbInformation
txtGoodsName.SetFocus
txtGoodsName.SelStart = 0
txtGoodsName.SelLength = 10
Exit Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -