I've got an application with an ADP front end and a SQL Server back end. To enable the users to share reports, there is a separate ADP that sits on the file server, and the front end file (one on each desktop) has a reference to this file. Because our release date for a new version of this is a few weeks ago, this setup won't change.
If I have the front-end ADP open and then open the reports.adp file, they both crash, with the dialog box asking if I want to repair the database, and whether or not I want to report the failure to MS. Not a problem, though--as we just don't do that.
If I use the following code, it just hangs on the line that starts ".openCurrentDatabase..."
Can anyone provide insight into what other ways I might try to rename the reports in the remote reports?
Thanks much.
Jeremy
---
Jeremy Wallace
METRIX Project Coordinator
Fund for the City of New York
If I have the front-end ADP open and then open the reports.adp file, they both crash, with the dialog box asking if I want to repair the database, and whether or not I want to report the failure to MS. Not a problem, though--as we just don't do that.
If I use the following code, it just hangs on the line that starts ".openCurrentDatabase..."
Can anyone provide insight into what other ways I might try to rename the reports in the remote reports?
Thanks much.
Jeremy
Code:
Dim App As Access.Application
Dim dbs As Object
Dim strDBPath As String
Dim obj As Object
Dim strName As String
strDBPath = Application.CurrentProject.Path & "\reportsql.adp"
Set App = New Access.Application
With App
.OpenCurrentDatabase strDBPath, False
Set dbs = App.CurrentProject
For Each obj In dbs.AllReports
strName = obj.Name
If left(strName, 3) <> "usr" Then
Call .DoCmd.Rename("usr" & strName, acReport, strName)
End If
Next obj
End With
dbs.Close
Set dbs = Nothing
App.Quit acQuitSaveNone
Set App = Nothing
End Function
---
Jeremy Wallace
METRIX Project Coordinator
Fund for the City of New York