RecordSet Property Causes Error

D

Don

In Access 2003, I tried setting the source of data for a report using the
RecordSet property as described in MSDN
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac11/ht
ml/acproRecordset_HV05251093.asp). However, when the code executes, and
error message pops-up saying "Run-time error '2593': This feature is not
available in an MDB".

I was unable to find anything that restricts the use of the Recordset
property. Is this limitation indeed true? Or did Isimply botch something
in the set-up?

Thanks!!

Don






Private Sub Report_Open(Cancel As Integer)
Dim cnnDB As ADODB.Connection 'DB Connection
Dim rstPositionData As ADODB.Recordset 'Recordset for tblPositionData
Dim strSQL As String

' Connect to Database and select data from tables
' ---------------------------------------------------------------------
Set cnnDB = CurrentProject.Connection
Set rstPositionData = New ADODB.Recordset
rstPositionData.Open strSQL, _
cnnDB, adOpenDynamic, _
adLockPessimistic, adCmdTableDirect

Me.Recordset = rstPositionData 'ERROR OCCURS HERE

End Sub
 

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