Refactoring in access requests

so I inherited an access db with different naming conventions applied to tables. I am in pain and I want to reorganize. The code is not a problem, but what about the SQL embedded in the queries?

Now to answer my own question roughly, but can anyone think of a better method?

+2


source to share


2 answers


You might want to check out Rick Fisher's Find and Replace tool. I think this will do what you want. It searches for and replaces all Access objects: forms, reports, queries, etc. I really liked this when I used it a few times a few years ago:

http://www.rickworld.com/products.html



I think there was at least one other all-encompassing find and replace tool for Access databases in the past, I don't remember its name or didn't know if it was still there.

+4


source


For Each qdf In CurrentDb.QueryDefs
    CurrentDb.Execute "insert into qdfs (name, sql) select '" & qdf.Name & "','" & Replace(qdf.sql, "'", "''") & "'"
Next qdf

      



Then I can filter my new qdfs table and at least figure out where I would need to rename the tables.

0


source







All Articles