Converting Multiple FILES

E

Eoin Bairead

Hi

I've been presented with a database where, for reasons that prabably
appeared OK to the author (mebbe converted from non-MS Access???) , there is
one table per file. Rather than open, convert & save all 150 .mdb files, is
there a macro that will do it ?

Thanks

Eoin

Eoin C. Bairéad
Dublin, Ireland
Áth Cliath, Éire
 
B

Brendan Reynolds

I don't have any Access 95 format files to test this on, so I tested it on
Access 97 files. This will convert all MDB files in the folder 'Source',
creating the converted copies in the folder 'Target'. In my tests, this code
took quite some time to complete, and Access was slow to update the screen
display while the code was running, so be aware that Access may *appear* to
have hung while running this code. You might want to wait for a time when
you can let it run unattended, and/or divide your 150 files into smaller
batches. (Then again, perhaps my system is just having a bad day! :) Good
luck.

Public Sub ConvertMDB()

Dim strFile As String

strFile = Dir("C:\Source\*.mdb")
Do While strFile <> vbNullString
Debug.Print strFile
Application.ConvertAccessProject _
"C:\Source\" & strFile, _
"C:\Target\" & strFile, _
acFileFormatAccess2002
strFile = Dir()
Loop
Debug.Print "Finished"

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