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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table is read only (but it's not!)

Status
Not open for further replies.

daveg232

IS-IT--Management
Mar 12, 2002
4
US
I've written an application that imports and reformats data. Its works great on every computer ive tryed it on, except of course the ONE computer that needs it. The error im getting onthe computer says "The table is read only" or something to that effect. Ive tryed everything i can think of. The database security for the table isset to give all access to all users. Ive made sure the user have the proper file permissions on the server to the file, and have even tryed it with a copy of the file on the local machine. Again the error is only coming up on this SINGLE machine. The only time the table is access is an (INSERT INTO execute statement) then i try to export it right after. Any help would be greatly appreciated. Heres the code the error keeps occuring in.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Private Sub subRemoveErrors()

CurrentDb.Execute "INSERT INTO [Error Table] " & _
"SELECT * FROM [Export Table] WHERE [City]='ERROR' OR [Zip]='ERROR' "

CurrentDb.Execute "DELETE * FROM [Export Table] WHERE [City]='ERROR' OR [Zip]='ERROR'"

End Sub

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Private Sub subTransferSpreadsheets()
Dim strExpFileName As String
Dim strErrFileName As String

On Error GoTo ErrHandler

strExpFileName = "LibExp" & Month(Now) & "_" & Day(Now) & "_" & Year(Now) & ".xls"
strErrFileName = "Errors" & Month(Now) & "_" & Day(Now) & "_" & Year(Now) & ".xls"

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Export Table", _
"C:\WINDOWS\Desktop\Marion Library" & Month(Now) & "_" & Day(Now) & "_" & Year(Now) _
& "\" & strExpFileName

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Error Table", _
"C:\WINDOWS\Desktop\Marion Library" & Month(Now) & "_" & Day(Now) & "_" & Year(Now) _
& "\Outbox\" & strErrFileName

Exit Sub

ErrHandler:

MsgBox ("subTransferSpreadsheets " & Err.Number & " " & Err.Description)
End

End Sub
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top