I am trying to export a table to a fixed width text document with
this syntax:
***Start Code***
'Open system form
DoCmd.OpenForm "FormSystem", , , , , acHidden
'Make temporary table
DoCmd.RunSQL "SELECT QueryPIExportUnion.Nominal,
QueryPIExportUnion.YearPeriod, QueryPIExportUnion.Date,
QueryPIExportUnion.Value, QueryPIExportUnion.DorC,
QueryPIExportUnion.JnlType, QueryPIExportUnion.Poster,
QueryPIExportUnion.JnlRef, QueryPIExportUnion.InvNo,
QueryPIExportUnion.Space4, QueryPIExportUnion.Prod,
QueryPIExportUnion.Supplier INTO TableTemp FROM QueryPIExportUnion;"
'Export text. This where the error occurs
DoCmd.TransferText acExportFixed, "ExportToSun", "TableTemp",
Forms![FormSystem]![ExportFile] & Forms![FormSystem]!
[ExportSequenceNo] & ".ndf"
'Close system form
DoCmd.Close acForm, "FormSystem"
'Delete temporary table
DoCmd.DeleteObject acTable, "TableTemp"
***End Code***
Whenever I do this I get this error message where indicated:
Run-time error '3027':
Cannot update. Database or object is read only.
What am I doing wrong?
Thanks in advance.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~->
Please zip all files prior to uploading to Files section.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AccessDevelopers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/