1 Reply Latest reply on Feb 8, 2012 10:10 AM by Lee CS Young

    iEdmFile8.GetDerivedBoms trouble

    Benjamin Abshire



      I am experiencing trouble with the following code that I got from another post awhile back. This code works perfectly in a Visual Basic 2010 windows Form App but does not work in Microsoft Access 2007 VBA. The error occurs while trying to use EdmBomInfo (boms) as an argument to the GetDerivedBoms call.


          Dim vault As IEdmVault10

          Set vault = New EdmVault5

          vault.LoginAuto "PDM_Vault", 0


          Dim File As IEdmFile7

          Dim Folder As IEdmFolder5

          Set Folder = vault.RootFolder


          Set File = vault.GetFileFromPath(Me.txbFilePath.Text, Folder)


      'good upto here


          Dim boms() As EdmBomInfo

          File.GetDerivedBoms (boms)


      The error says "Compile Error: Type mismatch: Array or user-defined type expected" and (boms) is highlighted.


      Any suggestions on how I can fix this?

      Thanks in advance.