Report Recordset

  • Thread starter Graeme Richardson
  • Start date
G

Graeme Richardson

Hi I'm trying to read a reports recordset with the code

Dim rst As DAO.Recordset
Set rst= Me.Recordset

The code fails on assigning the recordset with error
2593: This feature is not available in an MDB.

Is this code only valid for ADP projects, or is there something I'm missing?

Thanks, Graeme.
 
D

Duane Hookom

I'm not sure about the most recent version of Access but you can't use
RecordsetClone from a report like you can from a form. You could try
Dim rst As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb
Set rst = db.OpenRecordset(Me.RecordSource)

A word of caution: you might need to check the Filter and FilterOn
properties to limit the results of the rst.
 
G

Graeme Richardson

Thanks Duane, I don't want to run the query again though hence my request to
use Recordset property of a report (listed in A2K3)

Cheers, Graeme
 
Top