Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 29th, 2003, 10:01 PM
Authorized User
 
Join Date: Jun 2003
Posts: 54
Thanks: 2
Thanked 0 Times in 0 Posts
Default Finding "Broken Queries" , etc.

Being on a restricted budget, I don't have the luxury of using tools like "Speed Ferret" and others. Often, I find myself in the position of having to change Field Names in tables, which breaks queries, forms, reports, macros, and vba code. While it would be wonderful to be able to cross-reference a field name and get a list of all the things I am going to break [u]in advance</u>, right now, I would settle for something that would just tell me which queries I have broken by changing a field name.

Would anyone have an idea how to do that in VBA?

I originally tried enumerating all queries and checking for a Field count of 0, but that was not conclusive. It did find some broken queries, but not a lot. Here is my code:


dim db as dao.database
dim qdf as dao.querydef
    set db = currentdb
    for each qdf in db.querydefs
        if qdf.fields.count = 0 then
            debug.print qdf.name
        end if
    next qdf



--- Tom
__________________
--- Tom





Similar Threads
Thread Thread Starter Forum Replies Last Post
Broken CD ajb963 BOOK: Beginning Access VBA 19 October 28th, 2006 07:07 PM
Combining Queries or results from 2 queries Ford SQL Server 2000 24 November 7th, 2005 08:54 PM
broken cd waz84792 Flash (all versions) 5 October 22nd, 2004 08:42 AM
Broken References tcarnahan Access VBA 4 December 19th, 2003 12:10 AM
Broken Links kilika Forum and Wrox.com Feedback 1 September 15th, 2003 10:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.