Results 1 to 5 of 5
  1. #1
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936

    Reading fields in querydef - how to find criteria

    I have a query and I am listing the fields and where they come from - this is working fine ("for each fld in qdf.fields"). I am also trying to list the criteria associated with that field but can't seem to find it. Is it possible to get this information?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by criteria - field properties?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Any value in the "Criteria" line of query design.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I ran some code that listed all the properties of a field in a query. 'Criteria' is not one of them.

    I also ran code that listed properties of query. Criteria not there either but SQL is. The Value of SQL property is the full sql statement, including the WHERE clause.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Thanks for testing that out for me. I was trying to avoid having to parse the SQL, there are so many variations and possibilities. But it seems that that is the only way to be able to document a query fully.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. QueryDef
    By crowegreg in forum Programming
    Replies: 2
    Last Post: 09-18-2012, 09:31 AM
  2. Can someone explain querydef?
    By roguex20 in forum Access
    Replies: 2
    Last Post: 07-22-2012, 11:57 AM
  3. Criteria to find when cells are blank
    By Badvgood in forum Queries
    Replies: 3
    Last Post: 12-06-2011, 06:14 PM
  4. Exporting to Excel with Automation using QueryDef
    By Niezels in forum Import/Export Data
    Replies: 3
    Last Post: 09-26-2010, 05:55 PM
  5. Adding Totals to a query using queryDef
    By jrickels in forum Programming
    Replies: 7
    Last Post: 04-06-2010, 07:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums