As for your other error it means that what you are searching for returned no results. You should always check and see if your query returned results before trying to read the fields of the query. Either you would use recordcount as I have here or test for EOF before accessing the fields.
Code:sql2 = "SELECT * FROM baza_receptura WHERE nazvanje = " & Chr$(34) & string2klik & Chr$(34) rs2.Open sql2, con, adOpenDynamic, adLockOptimistic if rs2.recordcount>0 then txtNazvanje.Visible = True txtNaziv.Text = rs2.Fields(4).Value '>>>DEBUGGER SHOWS EOF ERROR HERE!<<< txtNaziv.Visible = True txtKomentar.Text = rs2.Fields(5).Value txtKomentar.Visible = True txtRezultat.Text = "" Else Msgbox "Record not found" End If




Reply With Quote