How to resovle this Error 'this object does'nt support this property or method'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • syedshaffee
    New Member
    • Jan 2012
    • 91

    How to resovle this Error 'this object does'nt support this property or method'

    hey,
    i am always getting this error 'this object does'nt support this property or method' while running this code
    Code:
    DoCmd.OutputTo acOutputQuery, "QryexportSecondarycashTracker", acFormatXLS, "C:\RIMSINLIVE" & "\temp.xls", True
    Please Help
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Check that all of the fields in the query are supported by excel for both datatype and size. Memo fields can be a pain; however, attchement fields will cause this to fail too.

    Comment

    • syedshaffee
      New Member
      • Jan 2012
      • 91

      #3
      But the Record gets Exported to excel anyway i don't want that error to pop up

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3653

        #4
        You could add error handling, and if the error matches this error number, just resume the code.... If your data exports OK, it should not be an issue, although, you should still try to find out what is causing the error, first.....

        Comment

        • TheSmileyCoder
          Recognized Expert Moderator Top Contributor
          • Dec 2009
          • 2322

          #5
          I do not know exactly what is causing your error, but it is always good practice to first try to solve error messages instead of just ignoring them.

          I suggest you do as zmbd has allready suggested, check that all field types being exported are allowed.

          Is the code overwriting or appending to the excel file if it already exists?

          In the future when you post a question please remember to include all relevant information in the first post. I would consider such information as you posted in post 3 quite relevant to have included in the first post.

          Not only will you get faster and more accurate replies, you will also get happier experts :) .

          Comment

          Working...