急关于Adodc5.Recordset.RecordCount的有关问题

急……在线等!关于Adodc5.Recordset.RecordCount的问题!IfAdodc5.Recordset.RecordCount0ThenAdodc2.Recor

急……在线等!关于Adodc5.Recordset.RecordCount的问题!
If   Adodc5.Recordset.RecordCount   <>   0   Then
      Adodc2.RecordSource   =   "select   *   from   qcxlk   where   wc= '1 '   and   xldbh= ' "   +   Text2.Text   +   " ' "
    If   Adodc2.Recordset.RecordCount   <>   0   Then


老是Adodc2.Recordset.RecordCount   <>   0   报错!错误原因是:

实时错误‘91’
对象变量或with块变量未设置。

如何解决?在线等!谢谢!


[解决办法]
If Adodc5.Recordset.RecordCount <> 0 Then
Adodc2.RecordSource = "select * from qcxlk where wc= '1 ' and xldbh= ' " + Text2.Text + " ' "
Adodc1.Refresh '加上这句
Adodc1.Recordset.Requery '或者加这句
试试吧