Results 1 to 2 of 2
  1. #1
    Bcanfield83 is offline Advanced Beginner
    Windows 7 32bit Access 2016
    Join Date
    May 2018
    Posts
    81

    Question Error Message

    I've run into an issue in which one person on the team receives an error message ("Compile Error: User-defined type not defined") when trying to run the below procedure. Essentially, this is used to create XML files and output them to a directory.
    The user running into the error message has a Windows 10 PC, whereas the other people on the team have Windows 7. I'm assuming this has something to do with why it's error'ing out.


    The Access DB that the procedure is located in is a .mdb file, though I also copied over the code to a DB in ".accdb" format and the same error message occured.
    The Microsoft XML, v6.0 reference is enabled.
    Any idea what would cause this to error out for somebody using a Windows 10 machine versus Windows 7? Below is a snippet of the code from this procedure.. the process errors out on the line where the "DOMDocument" object is declared.

    Sub createSecAuditXMLOutput1(lngAuditTypeID As Long)

    Dim db As DAO.Database
    Dim rs As DAO.Recordset
    Dim rs1 As DAO.Recordset
    Dim RS3 As DAO.Recordset
    Dim strFirst As String

    Dim objDom As DOMDocument <---- errors out at this line; error message: "Compile Error: User-defined type not defined"

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you perform this step?

    In the Visual Basic Editor Goto Tools->References and place a checkmark in the box for “Microsoft XML v5.0”
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-26-2016, 06:34 AM
  2. Replies: 7
    Last Post: 03-17-2016, 05:53 PM
  3. Replies: 5
    Last Post: 05-15-2015, 10:49 AM
  4. Replies: 15
    Last Post: 11-01-2013, 03:24 PM
  5. Replies: 7
    Last Post: 07-24-2013, 02:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums