Results 1 to 4 of 4
  1. #1
    Evgeny's Avatar
    Evgeny is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    85

    SQL in VBA

    Just another general question: when would you consider using SQL in VBA rather than in SQL Editor?

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    General when you the queries are action queries, like delete, update, append, create, alter etc.

  3. #3
    Evgeny's Avatar
    Evgeny is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    85
    Because i have read that most of professional db developers tend not to save quires at all, but rather have them running in VBA. is it correct? what would be the most optimal way to learn and approach this matter?

  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,640
    I generally only build SQL in VBA when it's dynamic (the structure will vary based on user selections. Sometimes when it's really simple (DELETE * FROM TableName). Most of my queries are saved. Saved queries are compiled and will run faster (whether you'll notice the difference is another matter). I won't pretend to speak "most" developers, but I know a lot of very good developers that do something similar.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

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