Results 1 to 2 of 2
  1. #1
    AccessGeek is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    19

    Working With Query Defs

    Does anyone have any thoughts on best practices when working with querydefs?
    I have an app that uses dynamic form parameters in a query def at runtime.
    I've always just used something like
    Set qd = CurrentDb.QueryDefs("MyQuery")


    This overwrites the previous querydef and this works fine.
    I've seen other people do a check if the query def exists, and delete it. Then use
    Set qd = CurrentDb.CreateQueryDef("MyQuery")
    I know both work, but is there an advantage of one method over the other?
    Thanks!

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    no there's not. Unless you have 500 or more people using your database. the difference, memory wise, is so small, that it's probably insignificant to 99.9^1000 people out there using it.

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

Similar Threads

  1. parameter query not working
    By denny in forum Access
    Replies: 3
    Last Post: 02-20-2011, 01:07 PM
  2. Query based form not working
    By Tewhano in forum Queries
    Replies: 1
    Last Post: 10-22-2010, 08:30 AM
  3. IIf Update Query working OK but a better way?
    By dreamweaver547 in forum Queries
    Replies: 7
    Last Post: 04-19-2010, 09:47 AM
  4. Query on chart not working properly!
    By Sim_ in forum Queries
    Replies: 0
    Last Post: 10-28-2009, 09:38 AM
  5. Query is not working
    By pushpm in forum Programming
    Replies: 3
    Last Post: 04-14-2009, 07:16 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