R
Roxana
I am working on an existing Access application created originaly in Access
2003. I converted the application to Access 2007 and added a report that
expects a parameter.
When I try to create the ACCDE file, I get this error:
"Microsoft Office was unable to create the /accde, .mde or .ade file"
This si the code added for the report:
Private Sub Response_Report_ID_Click()
Dim MyRec As Recordset
Dim rptID As Long
rptID = InputBox("Enter ID for the report", "ID number for the report")
Set MyRec = CurrentDb.OpenRecordset("qryResponseReport2", dbOpenDynaset)
With MyRec
.MoveFirst
Do While Not .EOF
If rptID = MyRec!ID Then
Call OpenReport("rptResponseReportID", rptID)
Exit Sub
End If
.MoveNext
Loop
End With
MyRec.Close
CurrentDb.Close
Set MyRec = Nothing
End Sub
Private Sub OpenReport(Report As String, rptID)
DoCmd.SetWarnings (False)
DoCmd.OpenReport "rptResponseReportID", acViewPreview,
"qryRNResponseReport", "id=" & rptID
DoCmd.SetWarnings (True)
End Sub
Any help would be appreciated.
Thanks
Roxana
2003. I converted the application to Access 2007 and added a report that
expects a parameter.
When I try to create the ACCDE file, I get this error:
"Microsoft Office was unable to create the /accde, .mde or .ade file"
This si the code added for the report:
Private Sub Response_Report_ID_Click()
Dim MyRec As Recordset
Dim rptID As Long
rptID = InputBox("Enter ID for the report", "ID number for the report")
Set MyRec = CurrentDb.OpenRecordset("qryResponseReport2", dbOpenDynaset)
With MyRec
.MoveFirst
Do While Not .EOF
If rptID = MyRec!ID Then
Call OpenReport("rptResponseReportID", rptID)
Exit Sub
End If
.MoveNext
Loop
End With
MyRec.Close
CurrentDb.Close
Set MyRec = Nothing
End Sub
Private Sub OpenReport(Report As String, rptID)
DoCmd.SetWarnings (False)
DoCmd.OpenReport "rptResponseReportID", acViewPreview,
"qryRNResponseReport", "id=" & rptID
DoCmd.SetWarnings (True)
End Sub
Any help would be appreciated.
Thanks
Roxana