Full Version: Docmd.transfertext Issue
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
LALVChris
Hello All,

I have this code that works fine:

DoCmd.TransferText (acExportDelim), "isight2", "qry_main_output_single", Me.FileNamePath & prov & ".txt"

When I try and change the last part to ".dat" I get a Database or Object is Read Only error. I would really like the file to have a .dat instead of .txt. Does anyone know a work around or know if my code is bunk?

Thanks,

Chris
Doug Steele
Hard as it is to believe, it's a security feature!

There is a registry tweak you can make that will allow it, but realistically you're probably best off creating the .txt file and renaming it:

CODE
DoCmd.TransferText (acExportDelim), "isight2", "qry_main_output_single", Me.FileNamePath & prov & ".txt"
Name Me.FileNamePath & prov & ".txt" As Me.FileNamePath & prov & ".dat"
LALVChris
Awesome! That works perfect! Thanks man!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.