Queries & Reports en masse changes possible?

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

Access 2003

A project that I have, has 15 queries and 15 reports (on the queries).

Only one table is involved - that just had two fields added.

I need to add two (the same) fields to each query and
One field (and label) (the same) to each report.

Any way to do this en masse (as a group)?

Any help would be greatly appreciated!

TIA Dennis
 
It would be possible to write code to do that, Dennis, but it would take
considerably longer to write the code than to do it manually.

Just make the change to one query, then copy and paste to the others - same
with the report. You'll have the job done in a fraction of the time it would
take to write the code.

If you still want to look further into how to do it programmatically, you'd
modify the query by modifying the SQL property of a DAO.QueryDef object.
You'd modify the report using the CreateReportControl method of the
Access.Application object. Check out those key words in the help files for
more information.
 
Brandan,

Thanks for your information.

I did look at Access Help & Google search but thought that some one may know an "obvious" easier
approach.

Even if someone had a pre-built utility macro.

At least I know that I am now wasting time.

Dennis
 
Well, not entirely a waste of time, I hope. If you have 150 queries instead
of 15 to change one day, then you'll know where to start looking! :-)

I've had to do that kind of thing occasionally, but not often enough that I
thought it worthwhile to make it into a reusable procedure - it was always
just throw-away once-off code, specific to the particular database I needed
to change. Sorry I couldn't be more help, but I wouldn't even know where to
find any of that old code now, and it wouldn't be usable without
considerable modification anyway.
 
Actually,

I was testing if any other reader may have some code that I could customize.

That may still happen as someone must have made some attempt to macroize to process. (Hello!! out
there!)

Your help was significant because 1) I got an answer and, as you stated, 2) I do know where to
start.

Thanks Brendan
 
Actually,

I was testing if any other reader may have some code that I could customize.

That may still happen as someone must have made some attempt to macroize to process. (Hello!! out
there!)

Your help was significant because 1) I got an answer and, as you stated, 2) I do know where to
start.

Thanks Brendan

I missed the beginning of this thread, but I'm wondering if one of
these third-party tools might be useful:

Free:
http://www3.bc.sympatico.ca/starthere/findandreplace
Find and Replace: http://www.rickworld.com
Speed Ferret: http://www.moshannon.com
Total Access Analyzer: http://www.fmsinc.com
 
I think they might help with the queries, at least, though probably not with
the reports. Dennis needs to add two fields to a bunch of queries, so
perhaps he could do something like search for ' FROM TableName' and replace
it with ', NewField1, NewField2 FROM TableName'.
 
Back
Top