I'm using Access XP, and trying to export a table to a .csv file using vba. I get the error "Run-Time error 3027, Cannot update, database or object is read only". Here's the code I'm using:
Option Compare Database
Public Sub Get_Input()
Dim strMsg As String
Dim Path As String
strMsg = "Enter the Fiscal Year and Fiscal Month in the format YYMM"
strInput = InputBox(strMsg)
'Change the path below to the live path
strPath = "C:\nfslawson\" & strInput & ".VAPGLTRANS.csv"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"AP_Query_Export", strPath, True
End Sub
What happens if you get scared half to death twice?
Bob
Option Compare Database
Public Sub Get_Input()
Dim strMsg As String
Dim Path As String
strMsg = "Enter the Fiscal Year and Fiscal Month in the format YYMM"
strInput = InputBox(strMsg)
'Change the path below to the live path
strPath = "C:\nfslawson\" & strInput & ".VAPGLTRANS.csv"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"AP_Query_Export", strPath, True
End Sub
What happens if you get scared half to death twice?
Bob