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
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