CurrentDB method problem

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top