I have a module in Access called "DoCmdSQL" that looks like this...
[code]
Sub PerformSQL(SQL As String)

DoCmd.RunSQL SQL

End Sub
[code]

My vba code of interest in Excel looks like this...
[code]
Dim appAccess As Object

Set appAccess = CreateObject("Access.Application")

appAccess.OpenCurrentDatabase (strPathDB & strDBName)

ChangeStatement = "UPDATE " & Table & " SET " & Table & ".specificnumber = " & arrChangeTo(k) & " WHERE ((" & Table & ".specificnumber)=" & arrChangeFrom(k) & ")"

appAccess.DoCmd.OpenModule "DoCmdSQL", "PerformSQL"
appAccess.Run "PerformSQL", ChangeStatement
[code]

My SQL statement should be fine...I think. If anything I am not sure what the appAccess statements are supposed to look like. Once again this works sometimes and sometimes it fails. I get Automation Errors and random runtime errors. Each database has ~10,000 rows * 365 days in a year so that change statement is changing looking for a specific number in the past (one for each day of the year) and changing it to a new number. My VBA code loops through a few years. Sometimes it makes it through one year and then crashes on the next...and then I have to start all over again. Once the database becomes read only...I'm fuct. What is making the databases randomly becoming read-only in the middle of updating (and sometimes the deleting) process? I obviously only posted the UPDATE statement but the DELETE code follows all of the same appAccess lines with the only difference is the DELETE statement. Thank you very much for any assistance.