Results 1 to 8 of 8

Thread: Runtime Error:3021

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    12

    Resolved Runtime Error:3021

    whenever i try load the form which contains this code. i get the "runtime error '3021': Either BOF or EOF is true.... "

    when i press "debug" button it shows the yellow highlight on "rs1.MoveFirst" line....

    plz help me resolve this problem

    Code:
    Private Sub Form_Load()
    Set conn = New ADODB.Connection
    conn.ConnectionString = "dsn=sts;uid=system;pwd=ora92"
    conn.Open
    
    Set rs1 = New ADODB.Recordset
    rs1.ActiveConnection = conn
    rs1.Open " select specid from rule "
    rs1.MoveFirst
    While Not rs1.EOF
    Combo1.AddItem rs1(0)
    rs1.MoveNext
    Wend
    Adodc1.Visible = False
    End Sub
    Last edited by madhanacdc; Oct 19th, 2008 at 06:33 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width