Exporting Forms and Reports from One db to another

CarlM1975

Registered User.
Local time
Today, 11:07
Joined
Oct 29, 2008
Messages
24
I have some code that wroks brilliantly for exporting all atbles and queries in a db to another db. However I come unstuck when it comes to exporting forms and reports:

Here it what I have for tables and queries,

For Each tdf In mydb.TableDefs
If (tdf.Attributes And dbSystemObject) = 0 Then
DoCmd.TransferDatabase acExport, "Microsoft Access", _
dbname, acTable, tdf.Name, tdf.Name
End If
Next tdf

For Each qdf In mydb.QueryDefs
DoCmd.TransferDatabase acExport, "Microsoft Access", dbname, acQuery, qdf.Name, qdf.Name
Next qdf

Is it possible to do the same for forms and reports?????

Thanks
 
DoCmd.CopyObject "c:\test.mdb", "test", acForm, "DetectIdleTime"

This will do it fine

What I did was to create a macro then converted the macro to code and this was the result.
 

Users who are viewing this thread

Back
Top Bottom