Results 1 to 10 of 10
  1. #1
    c918768 is offline Novice
    Windows 10 Access 2007
    Join Date
    Feb 2025
    Posts
    4

    I can't locate the queries

    I have an access app that also links to a back end access database. I have been trying to locate the queries that are called in the vb code that is part of the Access frontend app. I can't find them in either the Access frontend or the back end database. What might I be doing wrong. Is there something that I need to turn on in order to see the queries? Here is one of the calls to the queries. DoCmd.OpenQuery ("qryUpdateBE")

  2. #2
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    565
    Weird. Are they hidden?
    One way to see the query names is to use DAO and loop over the queries collection and print out the names etc

    dim i as integer
    for i = 0 to Currentdb.Querydefs.Count - 1
    debug.print Currentdb.Querydefs(i).Name
    debug.print CurrentDb.Querydefs(i).SQL
    debug.print /* blank line */
    next i

    You'd have to copy & paste that to a new module and run it. There could a be a bunch but they're just hidden.

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,930
    Another thing to check. Go to file>options>current database > navigation options and make sure the shown hidden objects option is ticked

  4. #4
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    565
    (But that would be too easy! LOL)

  5. #5
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    433
    if your FE is runtime, you won't see any objects in it.

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,930
    if your FE is runtime, you won't see any objects in it.
    but then the OP wouldn't be able to do the following

    Here is one of the calls to the queries. DoCmd.OpenQuery ("qryUpdateBE")

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You could provide files for analysis. Follow instructions at bottom of my post.
    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.

  8. #8
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    433
    also you mentioned VBA.
    if the query is built on a fly, eg:
    Code:
    Currentdb.CreateQueryDef("", sqlString)
    or by using Currentdb.OpenRecordset(sqlString), then
    the Query won't be listed on the navigation pane.

  9. #9
    c918768 is offline Novice
    Windows 10 Access 2007
    Join Date
    Feb 2025
    Posts
    4
    The Navigation Pane was not turned on. Thanks for sending me to the options, I noticed it from there and turned it on. I found the missing queries.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Then everything should have been missing, but you didn't mention that.
    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.

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

Similar Threads

  1. Locate match in two columns
    By jill27 in forum Queries
    Replies: 3
    Last Post: 03-01-2013, 01:44 PM
  2. Can not locate values in recordset
    By lawdy in forum Programming
    Replies: 8
    Last Post: 02-01-2013, 11:18 PM
  3. Replies: 1
    Last Post: 06-22-2012, 03:33 PM
  4. Cannot locate VBA code for MsgBox!
    By sjl in forum Forms
    Replies: 5
    Last Post: 12-20-2011, 05:26 PM
  5. Open form and locate it on the bottom
    By Dominaz in forum Forms
    Replies: 4
    Last Post: 11-17-2011, 08:03 PM

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