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 bkrike 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 file

Status
Not open for further replies.

debbieg

Technical User
Dec 2, 2002
190
US
I need to export data from a table to a CSV file. I have a form with a command button that runs the following:
Code:
Dim strSaveFileName As String
strSaveFileName = "C:\ADP\PCPW\ADPDATA\"
strSaveFileName = strSaveFileName & "EPIJJV01.csv"

DoCmd.TransferSpreadsheet acExport, , "tblADP", strSaveFileName, True
I get the following error:

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

Why am I getting an error about updating when I'm trying to export data?

Thanks,
Debbie
 
Never mind ... I used this and it works fine.
Code:
DoCmd.OutputTo acOutputTable, "tblADP", acFormatXLS, strSaveFileName, False
Sorry to waste your space.

Thanks,
Debbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top