CurrentDB method problem

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

I am trying to use the CurrentDb method to dimension the
database I am working in as an object, then dimension a
table as a recordset. I've done this before in other
databases, but for some reason it does not give
me "database" or "DAO" as an option to select from the
auto-complete list. When I type in "database" it remains
in lowercase. Here is the code I am using:

Dim dbsCOB As database
Dim rsCOBChild As Recordset

Set dbsCOB = CurrentDb
Set rscob = dbsCOB.openrecordset("child_cob")

What am I doing wrong?

Thanks, Lee
 
It is most likely from the Reference not set in the VBE.

In the VBE, go to Tools -> References.

And make sure a version of Microsoft DAO Object Library is
checked.
 
Back
Top