Results 1 to 3 of 3
  1. #1
    Aaron5714 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    48

    When To Compile A Database

    I am relatively new to VBA programming in Access and am wondering if/when I should be compiling my database (i.e. from the VBA Editor, selecting Debug > Compile Database). Should I be doing this every time I add/edit code, or only before distributing a new version to users, or do I not need to worry about it at all? I haven't been running this command and my database seems to work fine, so I am thinking that Access must be automatically compiling my code anytime I make changes?

    Any insight would be appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Should run Compile after any VBA code edits to expose some coding errors. During execution, run-time error msg will popup if code has bugs. Guess you are an excellent programmer if you never see errors.

    Do you include Option Explicit line at the top of every code module?
    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
    Aaron5714 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    48
    Quote Originally Posted by June7 View Post
    Should run Compile after any VBA code edits to expose some coding errors. During execution, run-time error msg will popup if code has bugs. Guess you are an excellent programmer if you never see errors.

    Do you include Option Explicit line at the top of every code module?
    Thanks June. Yes I always use Option Explicit. I do sometimes get runtime errors when testing then have to go back and fix the code. I'll try compiling from now on and maybe that will make things a bit easier.

    Thanks!
    Aaron

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

Similar Threads

  1. Automatically compile database
    By kevins in forum Programming
    Replies: 10
    Last Post: 08-28-2012, 07:24 AM
  2. Getting a compile error
    By alansidman in forum Programming
    Replies: 14
    Last Post: 02-11-2012, 01:12 PM
  3. Why do I get a compile error?
    By shabbaranks in forum Programming
    Replies: 24
    Last Post: 10-18-2011, 07:51 PM
  4. new compile error!
    By darklite in forum Access
    Replies: 6
    Last Post: 09-02-2010, 05:13 PM
  5. compile error
    By darklite in forum Access
    Replies: 6
    Last Post: 08-31-2010, 04:27 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