re.open sql,con,1就指向第一条记录了
    re.movefirst前要判断是不是第一条

解决方案 »

  1.   

    sql="select * into 临时表 from 表1"
    re.open sql,con,1
    re.open "临时表",con,1,3
    re.movefirst
      

  2.   

    con.execute "select * into 临时表 from 表1"
    if re.state=adstateopen then re.close
    re.open "select * from 临时表",con,adopenkeyset,adlockreadonly
    if re.recordcount>0 then
        re.movefirst
    endif
      

  3.   

    dsclub(▁▂▃▄▅▆▇█ 騩鹬) 
    也就是说要重新定义recordset???
      

  4.   

    if re.eof or re.bof then
       msgbox "haven't record!"
       exit sub
    end if
    re.movefirst
      

  5.   

    我自己觉的是象dsclub(▁▂▃▄▅▆▇█ 騩鹬) 所说的
    要打开临时表在进行读取,并且我这样也成功的做到了,只是
    不明白在什么情况下要重新打开临时表来进行读取???
    请高手指点
      

  6.   

    说难也不难,有开就有关嘛。你定义的re是个MODULE级的,说不定在哪里已经被打开了还没关上。
      

  7.   

    select * into 临时表 from 表1
    这条SQL语句是不会返回一个记录集的,所以紧接着的re.open sql,con,1 并没有打开记录集re.movefirst 当然会出错
      

  8.   

    看你的代码
      好象rs没有关掉,
      .....
      .....
      re.movefirst  '有错误
      .....
      re.close
    End Sub
      

  9.   

    rs.movefast时必须有记录
    你返回的rs中没有记录照成的...