设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 1947|回复: 1
打印 上一主题 下一主题

请问这个语句如何写

[复制链接]
跳转到指定楼层
1#
发表于 2007-7-9 20:05:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<>我用的是ADP程序,</P>
<>我想实现,从数据库POITEM里面查询数据 "select price from poitem where po_num='&amp;me.frm_po!po_num&amp; '"</P>
<>判断查询的数据的值中有没有是&lt;=0的,如果有就弹出对话框,没有的话就直接进行下一步..</P>
<P>谢谢.!!!!!!!!!!!</P>
<P>麻烦把具体的语句写出来!!<BR>Dim sqlstr As String<BR>Dim Rst As New ADODB.Recordset  //   是用ADO ,还是DAO,我不清楚,<BR>sqlstr = "select price from poitem where po_num='&amp;me.frm_po!po_num&amp; '"</P>
<P>接下来的语句,拜托各位大哥了.....<BR><BR></P>
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2008-9-20 22:16:32 | 只看该作者
OK
LET ME TO SHOW YOU!

'*******************************
Dim rs as new adodb.recordset
Dim sql as string
sql="select price from poitem where po_num=' “ & me.frm_po!po_num & ”'“
rs.open sql,currentproject.connection,1,3
if rs.eof and rs.bof then
  msgbox "Rorry!No Data Found!"
else
..............
..............
...................(your code)
end if
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-5 16:17 , Processed in 0.087914 second(s), 25 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表