I've googled this and I've come up with nothing.
I'm using the code below to produce a recordset for a report. all seems to work just fine except when i try to print I get the error:
"A custom macro in this report has failed to run, and is preventing the report from rendering"
I've traced the problem to .MoveNext in the Sub Detail_Format, but when I comment it out my report no longer steps through all of the records in the record set.
I'm new to using VBA for reports so (again) I'm happy to believe that I am not understanding some kind of fundamental logic for Recordsets and reports.
Using Access2007, XpOS.
I'm using the code below to produce a recordset for a report. all seems to work just fine except when i try to print I get the error:
"A custom macro in this report has failed to run, and is preventing the report from rendering"
Code:
Option Compare Database Option Explicit Dim rsOne As Recordset Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Me.txtFullName.Value = rsOne("FirstName") & " " & rsOne("LastName") rsOne.MoveNext End Sub Private Sub Report_Open(Cancel As Integer) Dim SQL As String SQL = "SELECT * FROM ReminderFinal" Set rsOne = CurrentDb.OpenRecordset(SQL) rsOne.MoveFirst End Sub
I'm new to using VBA for reports so (again) I'm happy to believe that I am not understanding some kind of fundamental logic for Recordsets and reports.
Using Access2007, XpOS.
Comment