vb select 多条件查询语句该怎么实现

[复制链接]
查看11 | 回复2 | 2011-9-30 13:42:26 | 显示全部楼层 |阅读模式
Private Sub cmdSearchGuest_Click() '快速查询
Dim sql As String
Dim cBranchID As String
Dim cBranchName As String
Dim cBranchTel As String
sql = "SELECT 客户编号,客户名称,联系地址,联系电话,邮箱,创建日期,备注FROM 客户信息 where 1=1"
If txtSearchGuestNo.Text"" Then sql = sql & " and 客户编号 like '%" & txtSearchGuestNo.Text & "%'" '客户编号...
回复

使用道具 举报

千问 | 2011-9-30 13:42:26 | 显示全部楼层
用AND连起来就是了 "select * from sb_report where start_t between '" & time_x & "'and '" & time_y & "' " And sb_name = '" & no &"' "&order by start_t...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行