FrymanTCU
05-06-2008, 10:41 AM
I am trying to export an excpection table after I run a series of queries to clean up a file. But somehow I keep getting an error stating the object is read only, Run time error '3027'. I do not know where I set the file to read only and how to reverse it. I have included a small part of the code that runs but I don't ever set database to read only or use the script open database. Please help!
DoCmd.OpenQuery "NewExceptionOutputFile", acViewNormal, acEdit
DoCmd.SetWarnings True
DoEvents
DoCmd.OpenTable "CurrentExceptions", acViewNormal, acEdit
' DoCmd.TransferSpreadsheet acExport, 8, "CurrentExceptions", "C:\Documents and Settings\richard.frye\Desktop\Manual Doc Audit\DocStatAudit.xml", True, ""
' DoCmd.TransferSpreadsheet acExport, 8, "CurrentExceptions", "C:\Documents and Settings\richard.frye\Desktop\Manual Doc Audit\DocStatAudit_" & Format(Now(), "m.d.yy") & ".xml", True, ""
DoCmd.Close acForm, "MainMenu"
DoCmd.OpenQuery "NewExceptionOutputFile", acViewNormal, acEdit
DoCmd.SetWarnings True
DoEvents
DoCmd.OpenTable "CurrentExceptions", acViewNormal, acEdit
' DoCmd.TransferSpreadsheet acExport, 8, "CurrentExceptions", "C:\Documents and Settings\richard.frye\Desktop\Manual Doc Audit\DocStatAudit.xml", True, ""
' DoCmd.TransferSpreadsheet acExport, 8, "CurrentExceptions", "C:\Documents and Settings\richard.frye\Desktop\Manual Doc Audit\DocStatAudit_" & Format(Now(), "m.d.yy") & ".xml", True, ""
DoCmd.Close acForm, "MainMenu"