I would think that you would be better off to use the appropriate
WhereCondition parameter, so that you only open the report with the records
that you wish to print. That way, if you happen to have a huge report, you
would not be having to wait for all of the report to format correctly in
preview mode. For example:
Private Sub cmdPreviewChangeBoardReview_Click()
On Error GoTo ProcError
DoCmd.OpenReport _
"rptChangeBoard", _
View:=acViewPreview, _
WhereCondition:="[Status_txt] = 'Review' " _
& "And [blnInactiveRecord] <> -1"
ExitProc:
Exit Sub
ProcError:
Select Case Err.Number
Case 2501 'Report cancled.
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in cmdPreviewChangeBoardReview_Click event
procedure..."
End Select
Resume ExitProc
End Sub
Trapping for error 2501 is a good idea, when combined with using the No_Data
event procedure in a report to cancle opening a report, if there is no data
that meets the specified criteria.
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________