Repost: Error running Report in an Access 2003 db from Access 2007

R

Randy

Ok, clarification - ignore the code from my original post, some of the
reports do work. The ones that don't are reports that I have being filtered.
Here is the code from one of those buttons:

Private Sub Ok_Click()
On Error GoTo Ok_Click_Err
'using the customer sub form for customer state report to filter the
report, clicking ok will open report for selected state
Dim stDocName As String
Dim stLinkCriteria As String

If Not IsNull(Me.Search_Results) Then
stLinkCriteria = "[StateOrProvince] = """ & Me![Search Results] & """"
End If

DoCmd.Close acForm, "Customers Sub Form For Customer State Report"

DoCmd.OpenReport "Customers by State", acPreview, acNormal,
WhereCondition = stLinkCriteria

Ok_Click_Exit:
Exit Sub

Ok_Click_Err:
MsgBox Err.Description
Resume Ok_Click_Exit

End Sub

Does this make sense?

ORIGINAL POST
Thanks in advance for any help. I have tried using Google for an answer but
haven't found a suitable one.
I developed a Customer Support Database in Access 2003 where two users
in our office use it daily. The database has been split and both users have
Access 2003 installed on their computers. They have no problems running any
of the reports. There are two users (myself included) who have Office 2007
installed - one on Windows XP and one on Vista. Neither of us using Office
2007 can run the reports from the database. We receive the same error for
all seven reports "The Microsoft Office Access database engine could not
find the object '0'. Make sure the object exists and that you spell its
name
and the path name correctly." Please note that all of the forms and
sub-forms work from the Office 2007 computers. Here is the code behind on
of
the buttons to run a report:
Private Sub Overdue_Workorders_Report_Click()
On Error GoTo Err_Overdue_Workorders_Report_Click
'opens overdue workorder report
Dim stDocName As String
stDocName = "OverDue Workorders Report"
DoCmd.OpenReport stDocName, acViewPreview, acViewNormal
Exit_Overdue_Workorders_Report_Click:
Exit Sub
Err_Overdue_Workorders_Report_Click:
MsgBox Err.Description
Resume Exit_Overdue_Workorders_Report_Click
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top