Object doesn't support this property or method. Error 438

S

swedbera

Hi,

I've used this same code in Access 2000 to build a report list, but now in
Access XP it will not work. I receive the following error message:

Object doesn't support this property or method. Error 438

I've researched the error, but I haven't found anything helpful. Can
someone help me with this please???

Arlene

Public Sub BuildReportList()
On Error GoTo ErrHandler

Dim objReport As AccessObject
Dim strReportName, strReportCaption As String

DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM [Report List]"

For Each objReport In CurrentProject.AllReports
DoCmd.OpenReport objReport.NAME, acViewDesign
With Reports(objReport.NAME)
If Not objReport.NAME Like "srpt*" Then
strReportName = objReport.NAME
strReportCaption = objReport.Caption
DoCmd.RunSQL "INSERT INTO [Report List]
([ReportName],[ReportCaption]) VALUES (strReportName,strReportCaption)"
DoCmd.Close acReport, objReport.NAME, acSaveNo
End If
End With
Next objReport
DoCmd.SetWarnings True

ExitHandler:
Exit Sub
ErrHandler:
DoCmd.SetWarnings True
MsgBox "Please record this information: " & Err.Description & " " &
Err.Number & " " & Err.Source, vbCritical
Resume ExitHandler
End Sub
 

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