A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old January 31st, 2008, 05:15 AM posted to microsoft.public.access
Randy[_8_]
external usenet poster
 
Posts: 7
Default Repost: Error running Report in an Access 2003 db from Access 2007

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


End Sub


Any thoughts?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.