Office中国论坛/Access中国论坛

标题: 请问这个语句如何写 [打印本页]

作者: rocket204    时间: 2007-7-9 20:05
标题: 请问这个语句如何写
<>我用的是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>
作者: tanzhou    时间: 2008-9-20 22:16
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




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3