T
tig
I thought you could use the CopyObject method on anything but modules,
but I continue to get this error when looping though my dbs. I've
tried TransferDatabase and get the same result
Any ideas?
TIA
Here's my code:
Sub copy_forms()
Dim x
Dim dbnames(1 To 9) As String
dbnames(1) = "C:\db1.mdb"
dbnames(2) = "C:\db2.mdb"
dbnames(3) = "C:\db3.mdb"
dbnames(4) = "C:\db4.mdb"
dbnames(5) = "C:\db5.mdb"
dbnames(6) = "C:\db6.mdb"
dbnames(7) = "C:\db7.mdb"
dbnames(8) = "C:\db8.mdb"
dbnames(9) = "C:\db9.mdb"
For Each x In dbnames
DoCmd.CopyObject x, "Main", acForm, "Main"
'DoCmd.TransferDatabase acExport, "Microsoft Access", x, acForm,
"Main", "Main"
Next
Close
MsgBox "Form Copies Complete"
End Sub
but I continue to get this error when looping though my dbs. I've
tried TransferDatabase and get the same result
Any ideas?
TIA
Here's my code:
Sub copy_forms()
Dim x
Dim dbnames(1 To 9) As String
dbnames(1) = "C:\db1.mdb"
dbnames(2) = "C:\db2.mdb"
dbnames(3) = "C:\db3.mdb"
dbnames(4) = "C:\db4.mdb"
dbnames(5) = "C:\db5.mdb"
dbnames(6) = "C:\db6.mdb"
dbnames(7) = "C:\db7.mdb"
dbnames(8) = "C:\db8.mdb"
dbnames(9) = "C:\db9.mdb"
For Each x In dbnames
DoCmd.CopyObject x, "Main", acForm, "Main"
'DoCmd.TransferDatabase acExport, "Microsoft Access", x, acForm,
"Main", "Main"
Next
Close
MsgBox "Form Copies Complete"
End Sub