Hi all,
I have a situation where I (have to) develop a database together with some other person.
Let's say we have develop1.mdb and develop2.mdb
We need to work on different 'pieces' of the app.
For testing purposes I need to 'merge' these two together to another database "Final.mdb"
Happily there will be no problem with object-names. (I use a naming convention, other developer does not)
From develop2.mdb I have code to
-- copy develop1.mdb to final.mdb (I delete the previous version first)
-- copy all objects from develop2.mdb to the new created develop.mdb
All works fine but is is slow... (> 2 minutes to copy about 200 objects)
To copy all object I use code like the following:
'This is code to copy the tables only, I do similar for forms, reports, query's and modules
Set db = CurrentDb
strSql = "SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>'~')"
strSql = strSql & " AND Left$([Name],4)<>'Msys'"
strSql = strSql & " AND (MSysObjects.Type)=1 ORDER BY MSysObjects.Name"
Set rst = db.OpenRecordset(strSql)
Do Until rst.EOF
'Debug.Print rst!Name
DoCmd.CopyObject strDestmdb, rst!Name, acTable, rst!Name
rst.MoveNext
Loop
Any ideas to improve this are welcome.
Arno R