Results 1 to 4 of 4
  1. #1
    Noob's Avatar
    Noob is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2016
    Posts
    36

    Help debugging DLookup query SQL


    Greetings,

    I just inherited this DB because I know VBA. The original author didn't leave many notes if any. I am trying to step through the code & figure out what they did. Everything has been going smooth till today. My problem is that strsql has no value till I step through this line & once I do I have a huge SQL query.
    Code:
    'Subroutines to change query SQL
    strQRY_Name = "Some Query Name"
    
    strsql = Nz(DLookup("QRY_SQL_Template", "ZTBL_Query_Execute", "QRY_Name='" & strQRY_Name &"'"), vbNullString)
    I looked at the table but I cant figure out where it is pulling the data to make the huge SQL statement. I dont know Access that well & I am hoping one of you seasoned pros can tell me how they would go about figuring this out if you were in my situation.

    TIA

    NooB

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If you're seeing the first bit of the SQL in the table, the rest is likely below. Try expanding the size of the grid, or hitting the down arrow while in field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Noob's Avatar
    Noob is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2016
    Posts
    36
    So SWEET!!!! You are the BOMB!!!! Thx a TON

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. U for MS AccessSeful DEBUGGING Add-Ins
    By JrMontgom in forum Access
    Replies: 4
    Last Post: 01-02-2016, 03:50 PM
  2. Need some help debugging an INSERT INTO query
    By kagoodwin13 in forum Queries
    Replies: 2
    Last Post: 05-08-2015, 10:12 AM
  3. Temporal Variables and Debugging
    By Demerit in forum Programming
    Replies: 2
    Last Post: 01-03-2015, 02:32 AM
  4. Debugging
    By eacollie in forum Programming
    Replies: 2
    Last Post: 06-04-2011, 05:29 AM
  5. Debugging help
    By Buakaw in forum Access
    Replies: 3
    Last Post: 02-16-2011, 09:50 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