请问select的使用

tgq1981 2003-10-18 09:30:10
一个窗口包括:combo1,combo2,combo3.做为数据为中的3个字段内容, 希望通过选择3个选项进行筛选 。
用rs.open "select * from example where example.学号='" & combo1.text & "'and example.姓名='" & combo2.text & "'and example.性别=combo3.text",1,3
但是这句话有错,谢谢指点!!!!!!!!!!!!!!!!
...全文
51 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
守城小轩 2003-10-18
  • 打赏
  • 举报
回复
rs.open "select * from example where example.学号='" & combo1.text & "'and example.姓名='" & combo2.text & "'and example.性别=combo3.text",1,3
没有conn打开参数,还有你的性别是什么类型的?
rs.open "select * from example where example.学号='" & combo1.text & "'and example.姓名='" & combo2.text & "'and example.性别='" & combo3.text & "'",conn,1,3
守城小轩 2003-10-18
  • 打赏
  • 举报
回复
rs.open "select * from example where example.学号='" & combo1.text & "'and example.姓名='" & combo2.text & "'and example.性别=combo3.text",conn,1,3
tongjigao 2003-10-18
  • 打赏
  • 举报
回复
我想如果你性别也是文本类型的话,应该是出在后面的那一部分了
rs.open "select * from example where example.学号='" & combo1.text & "'and example.姓名='" & combo2.text & "'and example.性别='"& combo3.text & "'",1,3
hhjjhjhj 2003-10-18
  • 打赏
  • 举报
回复
"'and example.性别=combo3.text",---这个地方怎么了,不用&和“”了???
flc 2003-10-18
  • 打赏
  • 举报
回复
支持 qqyy_sj(♀天地无邪)
bigpig 2003-10-18
  • 打赏
  • 举报
回复
trim能去掉中间的空格吗?
trim我觉得可以去掉两边的空格。
呵呵
andysammi 2003-10-18
  • 打赏
  • 举报
回复
哈哈;你可以试着用trim(combo1.text) 来去掉中间的空格,应该可以的

1,216

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧