Results 1 to 11 of 11
  1. #1
    kevins is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    26

    Automatically compile database

    In order to make sure everything works properly in my database, I have to compile the database when I open it. Database tools - Visual Basic - Debug - Compile.

    Is there a way to automate this so I don't have to do it every time I open the database? Thanks in advance.

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    This is not necessary. What makes you think it is.

  3. #3
    kevins is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    26
    I have a form that lists contact information. When I open the form initially, it's all blank. When I compile, it seems to fix the problem. I'm not really an expert with Access, so I'm not sure why it's happening now (it never happened before).

  4. #4
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    I have never heard of this problem.

    In fact once you have compiled you should not be able to compile again until you change something.

    When you access any code that is not compiled then MS Access automatically compiles it for you.

    Non compiled code will not run. If you are going to tell me that the code is not compiled then that would be interesting.

  5. #5
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Thinking on the Run, do you have any Yellow lines when you go to compile.

    Do you have to reset or stop code in order to compile.

    What else can you tell me.

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Kevins,

    Are you sure you aren't confusing "Compiling" with "Compacting and Repairing"?

  7. #7
    kevins is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    26
    It's been happening to me every day or even when I close the database and then reopen in....but not it seems to be working fine. I was going to do some screenshots so you could see what I was dealing with, but maybe the problem fixed itself?

    It started when I compacted and repaired my back end. The contact details form on my front end that lists all the information for any given contact was then blank for whatever record I selected. I would then go into VBA - Debug - Compile and that seemed to fix everything. Looks ok now but we'll see if it lasts. Thanks again for helping me try to solve my problem, I will investigate further to see if I can figure out what went wrong.

  8. #8
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Are you saying that you have Code in the Back End.

  9. #9
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    This type of thing comes under what I call Strange, Odd and Curious Behavior, and S/O/C/B, especially when coupled with repeating of the odd behavior, over and over and over, again, usually translates into corruption, of one type or another. Coming as the app opens, I’m afraid that it’s probably the app, itself that has gone south! When the app was opening properly, was there a Form that loaded automatically? If so, how was this accomplished?

    The fact that it started immediately after you did a Compact & Repair only strengthens the likelihood that this is the problem, as, paradoxically, doing a C&R is a recognized cause of corruption. This procedure should never be done without backing up the app, first.

    The first thing to attempt, for this type of corruption, is to create a new, blank file and import everything into it. Only takes a minute or two to create and check out, and if it doesn't work you haven't really lost anything! And, amazingly, it does frequently work!

    Linq ;0)>

  10. #10
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Ling may be onto something.

    My advise would be to decompile before importing into a new database.

    You don't want to go importing damaged code that may be there but you can't see.

  11. #11
    kevins is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    26
    Linq and Rain,

    Took your advice and did the import today...so far so good! Will let you know if it gives me any issues. Thanks for the help.

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

Similar Threads

  1. Replies: 7
    Last Post: 07-12-2012, 02:35 PM
  2. Getting a compile error
    By alansidman in forum Programming
    Replies: 14
    Last Post: 02-11-2012, 01:12 PM
  3. new compile error!
    By darklite in forum Access
    Replies: 6
    Last Post: 09-02-2010, 05:13 PM
  4. Replies: 7
    Last Post: 03-03-2010, 11:06 AM
  5. Have database open automatically
    By Norman Masson in forum Access
    Replies: 6
    Last Post: 01-08-2008, 07:41 AM

Tags for this Thread

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