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