Is there any way to give a command to import all the forms from a
database?
I couldnt doi it. I tried to import all the forms from a database into
my database where i have only one form. This form is called Form1, and
on its control on the OnClick event i have the following line:
ImportAllForms( "C:\BE\temp.mdb")
and the function is :
Private Function ImportAllForms(strDbName As String)
Dim appAccess As Access.Application
Dim frm As AccessObject
Set appAccess = New Access.Application
appAccess.OpenCurrentDatabase strDbName, False
'loop
For Each frm In appAccess.CurrentProject.AllForms
DoCmd.TransferDatabase acImport, "Microsoft Access", strDbName, acForm,
frm.Name, frm.Name
Next frm
appAccess.CloseCurrentDatabase
Set appAccess = Nothing
End Function
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!