Problem using PIA interop Assemblies for Modules and Forms in an Access Database

Hi,

I'm trying to copy from a database to another, modules and forms.
here is the code I am using,

For i = 0 To appAccess2.Modules.Count - 1
ListBox1.Items.Add("Modules " & appAccess2.Modules.Item(i).Name)
appAccess2.DoCmd.CopyObject(
updated, appAccess2.Modules.Item(i).Name, Microsoft.Office.Interop.Access.AcObjectType.acModule,
appAccess2.Modules.Item(i).Name)
Next


It doesn't want to execute the copyobject method, and i don't know why, there is obviously 2 modules in the database. And It is the same for the forms, it seems there's no forms.

Is someone can help me

thanks




Answer this question

Problem using PIA interop Assemblies for Modules and Forms in an Access Database

  • crab_era

    VSTO 2005 does not have Access projects, so I guess you're using a shared addin, not VSTO, for this. This question is more appropriate for one of the Access programmability forums, in particular: http://www.microsoft.com/office/community/en-us/default.mspx dg=microsoft.public.access.modulesdaovba&lang=en&cr=US

    Best regards


  • Paladinx333

    I know it does not, and as I describe in my message, i'm using pia interop assemblies. And I can manage an Access database successfully in VSTO 2005.
    The problem is that I can't find any help on Access database programming, and everyone tell me as i'm not in right forum. And i think I am.
    Do you know interop assemblies by the way, as you tell me that
    Now I'm fine with the copy object method cos I wasn't using the right objects.
    I had to use the appAccess.CurrentProject.AllModules object instead.
    But there is still a problem when I want to copy while there is a password in the visual basic project.



  • Problem using PIA interop Assemblies for Modules and Forms in an Access Database