-- 作者:漂亮美眉vszh
-- 发布时间:2016/7/19 10:22:00
-- 查询代码
比如说我想查找 名称为“扁钢”、并且规格型号包含“40”的物料信息,可是查询后的内容没出来,老师们帮我看下代码哪里有误?
此主题相关图片如下:qq图片20160719101049.png
Dim wldm As WinForm.TextBox = e.Form.Controls("物料代码") Dim wlmc As WinForm.TextBox = e.Form.Controls("物料名称") Dim ggxh As WinForm.TextBox = e.Form.Controls("规格型号")
Dim filter As String If wldm.Text <> "" Then If filter > "" Then filter = filter & " And " End If filter = "物料代码 Like \'%" & wldm.Text & "%\' " End If If wlmc.Text<> "" Then If filter > "" Then filter = filter & " And " End If filter = "物料名称 Like \'%" & wlmc.Text & "%\'" End If If ggxh.Text <> "" Then If filter > "" Then filter = filter & " And " End If filter = "规格型号 Like \'%" & ggxh.Text & "%\'" End If If filter > "" Then Tables("物料信息").Filter=filter End If
|