[AccessD] A2K: Dim DAO.Recordset

Charlotte Foust cfoust at infostatsystems.com
Tue Mar 25 10:40:05 CST 2003


Actually, it's because reports in A2k and earlier don't expose their
recordset property.  In AXP, reports have an exposed recordset property.

Charlotte Foust

-----Original Message-----
From: Drew Wutka [mailto:DWUTKA at marlow.com] 
Sent: Tuesday, March 25, 2003 12:28 AM
To: 'AccessD List '
Subject: RE: [AccessD] A2K: Dim DAO.Recordset


This is because a form is an interface for a recordsource, where as a
report is just a 'snapshot' of the data.  Thus, you can view various
data on a report, as it is formatting, but it is only reading the data.
With a form, you can 'change' data from the form, thus the recordset
behind it is 'open' and available.

The RecordSource property is just the name of the table or query (or SQL
statement) that the form or report is using for it's bound data source.

Drew

-----Original Message-----
From: Darren DICK
To: AccessD List
Sent: 3/24/03 9:07 PM
Subject: [AccessD] A2K: Dim DAO.Recordset

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





_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list