When you change table names, there really is not shortcut to properly updating the queries. IMHO, All the queries should be fixed not patched. Your solution seams to be a harder way and will probably slower executing.
You may want to consider the product Speed Ferret.
You may also find this useful:
Public Sub UpdateFieldNameInQueries()
Dim qdf As DAO.QueryDef 'Note: you may need to set a reference to DAO
Const cFrom = "BRANCH ID"
Const cTo = "BRANCH_ID"
With CurrentDb
For Each qdf In .QueryDefs
qdf.SQL = Replace(qdf.SQL, cFrom, cTo,,,vbTextCompare)
Next qdf
End With
End Sub
from:
http://www.utteraccess.com/forums/sh...ost1513505&Zp=
Boyd
"Hi Tech Coach"
Access Based Accounting/Business Solutions developer.
http://www.officeprogramming.com