I "inherited" an access app that manages a golf league. Each week, cards are produced depending on whether the league is playing the front or back. The report renders correctly and the data displays correctly. When I do a print preview I get the error 2448 with the error message on the code that puts the appropriate yardage in the first box. Here is the code:
Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("course")
Dim x As Long
Dim y As Long
Dim holex As Long
If Me.[Front/Back] = 1 Then
holex = 0
Else
holex = 9
End If
With rec
Do Until .EOF
Select Case Left(rec!Hole, 1)
Case "b"
y = 0
For x = 1 To 9
Me("B" & x) = rec("[" & x + holex & "]")
The last entry is where the debugger stops. The cards are fine in the report view. The print and/or print preview has the issue