Report Recordset Property (ADO)

G

Guest

I am trying to run a report with data from an external access database.

I a using ADO to open a recordset in the external database, but get the
following error when I set the report's recordset property: "This feature is
not available in MDB."

The code below is assigned to the report's Open event. The code breaks at
"Set Me.Recordset = rs"

Thanks,
DEI

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim connstring As String

connstring = "Provider=Microsoft.Jet.OLEDB.4.40;" & _
"Data Source=E:\Nursing Exits\NursingExitConv.mdb"

Set conn = New ADODB.Connection

With conn
.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=E:\Nursing Exits\NursingExitConv.mdb"
End With

Set rs = New Recordset

With rs
Set .ActiveConnection = conn
.Source = "SELECT * FROM NursingExitData"
End With

Set Me.Recordset = rs

Set rs = Nothing
Set conn = Nothing
 
D

Dirk Goldgar

DEI said:
I am trying to run a report with data from an external access
database.

I a using ADO to open a recordset in the external database, but get
the following error when I set the report's recordset property: "This
feature is not available in MDB."

The code below is assigned to the report's Open event. The code
breaks at "Set Me.Recordset = rs"

See my response to your other thread on this subject.
 

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