Drew Wutka
DWUTKA at marlow.com
Tue Mar 25 02:28:20 CST 2003
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