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.Applicat ion
Dim frm As AccessObject
Set appAccess = New Access.Applicat ion
appAccess.OpenC urrentDatabase strDbName, False
'loop
For Each frm In appAccess.Curre ntProject.AllFo rms
DoCmd.TransferD atabase acImport, "Microsoft Access", strDbName, acForm,
frm.Name, frm.Name
Next frm
appAccess.Close CurrentDatabase
Set appAccess = Nothing
End Function
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!