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

TransferText - Query as Table Parameter

P: 47
Hello everyone,

I have been looking around to see if a pre-defined query can be used as the table source argument in a transfertext call. I believe it is possible but I am getting an error that I left the table name argument blank.

Why is this happening?

This is the code I am using:

DoCmd.TransferText acExportDelim, , qryDetailQueryForExportingData, strFilePath & "" & strFileName
Jul 18 '07 #1
Share this Question
Share on Google+
4 Replies


JKing
Expert 100+
P: 1,206
Try changing it to this:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acExportDelim, , "qryDetailQueryForExportingData", strFilePath  & strFileName
  2.  
Jul 18 '07 #2

P: 47
Ok I changed it to what you suggested and now have the following error:

"Cannot update - Database or object is read-only."

I am sure that my Databse is not read-only...

Any ideas?
Jul 18 '07 #3

JKing
Expert 100+
P: 1,206
Are you entering an extension when you enter the filename?

Example when you're prompted for a filename try entering in "test.txt"
Jul 18 '07 #4

P: 47
Ok I got it working. Thanks a ton for the help!! I appreciate it.
Jul 18 '07 #5

Post your reply

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