Getting the current connection

  • Thread starter Thread starter William Gower
  • Start date Start date
W

William Gower

I am writing some code in a module to open an ado recordset and then just
loop through the recordset and do something. How do I tell it that I want
to open a recordset to the current database. I knew how to open an access
connection in a vb app but i am thinking that there should be an easy way to
do it inside of access.

rsEmail.Open "Select email from member where email is not null"
rsEmail.MoveFirst

etc.
 
In A2000+, you can use:

CurrentProject.Connection

HTH
Van T. Dinh
MVP (Access)
 

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

Back
Top