In Access 2007, runnng any report from the Report Manager generates the error "The Microsoft Access Database Engine could not find the object "'& QryName & "'. Make sure the object exists and that you spell its name and the path name correctly.

52 views
Skip to first unread message

dbcTech

unread,
Nov 10, 2009, 1:51:26 PM11/10/09
to Database Creations Accounting Software
This is due to a design change in Access 2007. To workaround this
error, a code change needs to be made to the Standard Report Manager
(the Advanced Report Manager is not affected). You need exclusive
access to the Standard Report Manager file (stdrptman.mda) to make
these changes. To do this, close the Business! program file. Note: If
you share your report manager database, have all users close Business!
prior to making these code changes.

1. Open the Report Manager database (stdrptman.mda). This file is
normally located in the same folder as your Business! program file
2. Select Forms and open in DESIGN VIEW the form named Report
Selection Screen
3. Press the Code button from the Tools group of the Design Ribbon
4. Search for "Private Sub Print_Click"
5. Within this subroutine, change the code to look like the following:

For CopyNumber = 1 To NumCopies
'Updated for Access 2007
If Len(Trim(Nz(QryName))) <> 0 Then
DoCmd.OpenReport DocName, prnttype, """ & QryName & """
Else
DoCmd.OpenReport DocName, prnttype
End If

Next CopyNumber
End If
6. Select File, Save from the VBA Editor Window then close the VBA
Editor
7. Close the Standard Report Manager, saving your changes if prompted
8. Open Business! and test
Reply all
Reply to author
Forward
0 new messages