Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Type Definition Error (AXP)

    Hello,
    I am trying to run some code that outputs an RTF file and I am getting a type definition error. This code runs fine on my laptop but not on the server that it needs to run on. I have checked that the path is correct and that I have write permissions for that folder. Any ideas? Maybe there is a better way to do it?

    DoCmd.OutputTo acOutputReport, strReportVAR, acFormatRTF, "c:my documents" & strUFolder & "" _
    & "" & strOutFile1

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Type Definition Error (AXP)

    Perhaps there is a problem with references - this may occur if you develop a database on one computer and then run it on another computer with slightly different (versions of) object libraries installed.

    Open the database (the copy that is on the server), activate the Visual Basic Editor, open any module and select Tools/References... If any of the references says "MISSING: ...", note what reference it is (and look at the corresponding path and filename), then uncheck it, and click OK to close the References dialog. See if your code runs now.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Type Definition Error (AXP)

    Put in a breakpoint and use the immediate window to print out the values in your variables. You can get that message if you leave out a filename in the destination path too.
    Charlotte

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Type Definition Error (AXP)

    Thanks Hans,
    I will try this as soon as I am able to get online to test it this evening.

    Thanks,
    Mark

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Type Definition Error (AXP)

    Hi Charlotte,
    Thanks for the reply. I did this already but I have since tried building the path a little differently. I will let you know what happens.

    Thanks,
    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •