Matt F.
Matt F.

Reputation: 145

Why does my database object show no Recordsets?

Why does my database object show no Recordsets? And why does it not show a Connection? The key bit of code is:

Public Sub PrintRecords()
  Dim dbCurr As DAO.Database
  Set dbCurr = CurrentDb

  Dim rsCourses as Recordset
  Set rsCourses = CurrentDb.OpenRecordset(“Courses”)
End Sub

screenshot at time of error Here is my screenshot, where the database has tables (upper left), but the CurrentDB object has a name but no Recordsets (in the locals window below.)

For what it’s worth, this is in Access 2013, following this tutorial to manipulate the database, stopping on the error “Run-time error ‘3078’: The Microsoft Access database engine cannot find the input table or query”. But the problem seems to be deeper than that.

Upvotes: 1

Views: 65

Answers (1)

Andre
Andre

Reputation: 27634

You have typographic quotes in there, use straight ones "".

And use your assigned database object:

Set rsCourses = dbCurr.OpenRecordset("Courses")

And please don't post only screenshots of code, copy & paste the code itself as text.

Upvotes: 2

Related Questions