DoCmd.Open Report Bug - Please help!
Has anyone experienced this problem? I am trying to get a report to open based on a combo box value, in this case, project number. My code is as follows:
Private Sub cmdPreviewCatalog_Click()
On Error GoTo Err_cmdPreviewCatalog_Click
Dim stDocName As String
Dim strWhere As String
strWhere = "ProjectNumber = '" & cboProjectNumber & "'"
stDocName = "rptArtifactCatalog"
DoCmd.OpenReport stDocName, acViewPreview, , strWhere
Exit_cmdPreviewCatalog_Click:
Exit Sub
Err_cmdPreviewCatalog_Click:
MsgBox Err.Description
Resume Exit_cmdPreviewCatalog_Click
End Sub
When I run this application at my home, the report opens and there are no problems. However, when running this event procedure at my client's office, my entire database, and Microsoft Access, closes. I have developed the database on Access 2003, and my client owns Access XP. We both have Windows XP as our O/S.
Has anyone seen this problem? If so, what sort of patches/hotfixes to I need to download in order to get the application to work at my client's office?
Thank you in advance.
Brian in Raleigh
|