Thank June7...I re-looked at ALL the error codes that were popping up and realized that the reason for the error was actually happening earlier in the code. Below was the original code and the error that popped up was "about to update 0 row(s)". If I clicked yes, it would get stuck in a never ending loop. If I clicked no, I would get a runtime error 2501.
Code:
Dim j, k As Integer
For j = 0 To dbA.TableDefs.Count - 1
For k = 0 To dbA.TableDefs(j).Fields.Count - 1
dbA.Execute ("insert into tbl_Tablefields (tname, fname, ftype) values ('" & dbA.TableDefs(j).Name & "','" & _
dbA.TableDefs(j).Fields(k).Name & "','" & dbA.TableDefs(j).Fields(k).Type & "')")
Next k
Dim strTname As String
strTname = "'tbl_Res_Analytical_S'"
DoCmd.RunSQL ("update tbl_Tablefields set inImpList = true where tname in (" & strTname & ")")
Next j
When I move next j right after next k and then run my docmd all works. I'm fine with the change in logic, but now my co-workers computer wants to confirm every action. I've added the code below and it stops asking for the confirmations but I guess now my issue has changed slightly to why does my co-workers computer have to confirm actions but mine does not. And why did the original code work on mine and not my co-workers? But I guess that's a question for another thread.
Code:
Application.SetOption "Confirm Action Queries", 0