Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

Converting Multiple FILES

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eoin Bairead - 03 Sep 2005 17:38 GMT
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
Brendan Reynolds - 03 Sep 2005 22:35 GMT
What do you want to convert from, and what do you want to convert to?

Signature

Brendan Reynolds (MVP)

> Hi
>
[quoted text clipped - 10 lines]
> Dublin, Ireland
> Áth Cliath, Éire
Eoin C. Bairéad - 03 Sep 2005 23:45 GMT
Hi

From Access Office 95 to Access Office 2003.

Eoin

> What do you want to convert from, and what do you want to convert to?
>
[quoted text clipped - 12 lines]
> > Dublin, Ireland
> > Áth Cliath, Éire
Brendan Reynolds - 04 Sep 2005 13:07 GMT
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

Signature

Brendan Reynolds (MVP)

> Hi
>
[quoted text clipped - 19 lines]
>> > Dublin, Ireland
>> > Áth Cliath, Éire
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.