有4个文本框:文章编号txt_id, 标题txt_title, 作者txt_author, 出处txt_from
做个查询,当输入为空,显示全部记录,当任意输入其中的文本框,显示出符合条件的记录,怎么做?
请高手指点,谢谢!
做个查询,当输入为空,显示全部记录,当任意输入其中的文本框,显示出符合条件的记录,怎么做?
请高手指点,谢谢!
解决方案 »
- 485通信轮巡问题
- VB高手帮忙看下VB解压rar文件的问题。
- 100分,求解答?listview中单击某一列中的单元格显示combobox控件,单击令一列的单元格显示textbox控件
- 怎样获得另一程序窗口里的图片在其窗口里的位置?
- 高分求图象轮廓线算法,最好有源代码!!
- 关于向数据库中添加日期记录的问题,请帮忙。
- 怎么将grid的内容转化为html文件
- 小虾脚软请求大虾帮助- -!
- 怎样编辑MSHFlexGrid单元格中的内容?
- 为什么我的textbox在运行时光标老在文本前跳动?怎么使textbox在运行是的光标不显示出来?
- WNetAddConnection函数问题?
- 界面OFFICE化
dim strsql as string if len(txt_id)>0 then wherestr=wherestr & "id='" & txt_id & "' and "
if len(txt_title)>0 then wherestr=wherestr & "title=' and " & txt_title& "'"
if len(txt_author)>0 then wherestr=wherestr & "author=' and " & txt_author& "'"
if len(txt_from)>0 then wherestr=wherestr & "from='" & txt_from& "' and "if len(wherestr)>0 then
wherestr=" where " & left$(wherestr,len(wherestr)-4))
end ifstrsql="select * from [youtable] " & wherestr
http://www.5ivb.net/club/vbupload/hooligan_vb.rar
谢谢了
按“下一条记录”时就 "select * from (" & strsql & ") where 自动ID > " & cStr(mRemID)最后记得把当前显示记录的自动ID赋值给mRemID