I am creating an archive method for a database that has grown too large. I have queries that generate the data I need to archive, and I have created code that creates a new database that I want to export the archive data to. I then use DoCmd.TransferDatabase to send the results of the queries to the new database.
I am getting a run-time error 3024 which tells me the destination database cannot be found. Yet it does exist, in precisely the same path and name as it says it cannot find.
I know nothing is misspelled as the path name used to create the new database is passed to the routine that uses transferdatabase.
Does anyone know if this is a bug and how to get around it?
Access2007 - writing to an .accdb, not an .mdb
Private Sub ArchiveTables(ArcDB As String)
DoCmd.TransferDatabase acExport, "Microsoft Access", ArcDB, acTable, "ArchiveBasicDataQuery", "Basic_Data", 0
End Sub
I am getting a run-time error 3024 which tells me the destination database cannot be found. Yet it does exist, in precisely the same path and name as it says it cannot find.
I know nothing is misspelled as the path name used to create the new database is passed to the routine that uses transferdatabase.
Does anyone know if this is a bug and how to get around it?
Access2007 - writing to an .accdb, not an .mdb
Private Sub ArchiveTables(ArcDB As String)
DoCmd.TransferDatabase acExport, "Microsoft Access", ArcDB, acTable, "ArchiveBasicDataQuery", "Basic_Data", 0
End Sub