By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

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

P: 91
i am always getting this error 'this object does'nt support this property or method' while running this code
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputQuery, "QryexportSecondarycashTracker", acFormatXLS, "C:\RIMSINLIVE" & "\temp.xls", True
Please Help
Oct 4 '12 #1
Share this Question
Share on Google+
4 Replies

Expert Mod 5K+
P: 5,397
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.
Oct 4 '12 #2

P: 91
But the Record gets Exported to excel anyway i don't want that error to pop up
Oct 5 '12 #3

Expert Mod 2.5K+
P: 3,284
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.....
Oct 5 '12 #4

Expert Mod 100+
P: 2,321
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 :) .
Oct 5 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.