PC Review


Reply
Thread Tools Rate Thread

ADO Not Opening Recordset

 
 
Leo
Guest
Posts: n/a
 
      17th Feb 2010
Help: I am just starting at a new company, and am having issues getting
Access to perform ADO.recordset operations correctly. And, there is no
"go-to" person here. I am just trying to use automation to make my life
easier. The code below returns an empty recordset ("-1" on the message box
which I added as a test). It finishes with an error message

I assume that I am just missing a library. I do have the MS ADO 2.8 and VBA
libraries selected in references. My version is Access 2003.

Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

With rs
.ActiveConnection = CurrentProject.Connection
.CursorType = adOpenDynamic
.LockType = adLockPessimistic
.Open "SELECT * FROM tblNorthstar;"
End With
MsgBox rs.RecordCount

rs.close
Set rs = Nothing


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a Recordset Roderick O'Regan Microsoft Access Macros 1 12th Nov 2007 02:56 AM
Need help opening ADO recordset. =?Utf-8?B?SHVudGVyNTc=?= Microsoft Access VBA Modules 14 16th Sep 2007 01:42 PM
SQL for Opening Recordset =?Utf-8?B?Q2FybWVu?= Microsoft Access VBA Modules 2 14th Dec 2006 07:18 AM
Opening a recordset =?Utf-8?B?RGFu?= Microsoft Access Form Coding 2 21st Jul 2006 06:34 PM
Opening a recordset =?Utf-8?B?dGlzY2hsZGE=?= Microsoft Access VBA Modules 2 28th Apr 2005 12:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:35 AM.