[AccessD] A2K: Dim DAO.Recordset

Darren DICK d.dick at uws.edu.au
Mon Mar 24 21:07:27 CST 2003


Hello all
Why does...
	Dim rs As DAO.Recordset
	Set rs = Me.Recordset
work fine in a form but not in a report in the same dB?

eg on form

Private Sub Form_Load()
	Dim rs As DAO.Recordset
	Set rs = Me.Recordset
Debugs fine
but in a report

Private Sub Report_Open()
Dim rs As DAO.Recordset
Set rs = Me.Recordset
	or
Set rs = Me.RecordSource

When I debug, it fails on the = Me.Recordset bit
and an error msg says
Compile error.
Method or data member not found.

or if I use RecordSource it fails on the = Me.RecordSource bit
and an error msg says
Compile error.
Type Mismatch

Can't I set a recordset for a report??

Many thanks in advance

Darren







More information about the AccessD mailing list