In my initial response, I wrote: "Make certain that the text boxes do not
have the same name as the field, otherwise you will get a circular reference
error." Have you done this? This KB article may be helpful to you:
Troubleshooting Tips for Error Values
http://support.microsoft.com/kb/209132
Verify that you have at least one record available in the report's
recordsource, which is likely a query. If you do not, then you should use VBA
code to cancel the report's open event procedure. Something like this:
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo ProcError
MsgBox "There is no data for the selected criteria.", _
vbInformation, "No Data Available..."
Cancel = True
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in Report_NoData event procedure..."
Resume ExitProc
End Sub
If you are opening this report using a command button on a form, and the
above NoData event procedure triggers, then you will need to trap for Error
2501 as well. You would use code something like this on a form:
Private Sub cmdPrint_Click()
On Error GoTo ProcError
'Add this if printing the current record from a bound form
If Me.Dirty = True Then
Me.Dirty = False
End If
DoCmd.OpenReport "ReportNameGoesHere", acPreview
ExitProc:
Exit Sub
ProcError:
Select Case Err.Number
Case 2501 'Report open cancelled
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in cmdPrint_Click event procedure..."
End Select
Resume ExitProc
End Sub
Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________