Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to CSV having problem..please help!!!

Status
Not open for further replies.

trifest

Programmer
Sep 5, 2002
52
0
0
US
I have the following in code

DoCmd.TransferText acExportDelim, , "qryMAS90APExportsSorted", "F:\Export\AP" & [Forms]![frmStartup]![txtBatchNumber] & char(39) & [Forms]![frmStartup]!txtCompanyNumber


It says that "Cannot Update. Database or object is read only"

but if i add .txt to the end of the filename it works. I'm working in Access 2002.

Could I possibly substitute the period in the file name with an ASCII representation so that the period is not explicitly placed in the nameing convention.
 
I think that this may be Access 2002's esotoric security kicking in. It will only allow you to import files with certain extensions. This may apply to exports too.

You may have to save the file with a txt extension, then rename it afterwards using
filecopy "F:\Export\AP" & [Forms]![frmStartup]![txtBatchNumber] & char(39) & [Forms]![frmStartup]!txtCompanyNumber & ".txt",", "F:\Export\AP" & [Forms]![frmStartup]![txtBatchNumber] & char(39) & [Forms]![frmStartup]!txtCompanyNumber

hth

Ben

----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top