Results 1 to 7 of 7
  1. #1
    Neophite is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    13

    Creating an Execute-Only Database -- Project Compile Issues

    I have a DB with two distinct navigation forms for two classes of users. Each navigation form contains a couple of dozen forms which almost all load global variables during the form on-load event; these global variables are created/populated during the login event. In addition, there are buttons within many of the forms that are disabled upon the click event -- Y/N fields, create record, change/update record, etc. Everything works fine and dandy -- slick as a whistle. When I run Compile Project it pukes because all global variables required for the form on-load events are apparently null (absent the login event having occurred during the compile process), which appears to be no-no from a compile perspective, and, also the dis-enabling buttons seems to be another big no-no from a compile perspective, so, the compile stops dead in its tracks wherever the VBA code has one of these situations. Thus, the bigger issue is that I am not able to get through the compile process to turn my creation into an Execute-Only database. Oh, what to do?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you saying the compiler stops with an error when you try and compile? Variables do not require a value when you compile.

  3. #3
    Neophite is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    13
    Quote Originally Posted by RuralGuy View Post
    Are you saying the compiler stops with an error when you try and compile? Variables do not require a value when you compile.
    I think the problem is that in most forms I use a click event which triggers the VBA to create/save records to tables, and during the compile the compiler stops wherever it thinks I have used what are at the time of the compile null fields. So, when I try to compile to make for example an executable version, it stops at the first occurrence of one of these null fields, game over. At different times along the way, I went through the login routine -- where the global variable get populated in a Navigation form (two Navigation forms that are used, but it seems that one can only open/active at a time) -- and it compiles until it reaches the null fields in the forms/VBA record events that exist in the second un-opened Navigation form. And, I then reversed the order in order to compile that which would not compile in the first go-round. So, basically everything compiles, but not in mass.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I guess I'm a bit confused. I was not aware you have any control over the order the compiler takes to compile. Would it be possible to post your db here for review? Compact and Repair first and the ZIP it up for posting. Remove any sensitive data of course.

  5. #5
    Neophite is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    13
    Quote Originally Posted by RuralGuy View Post
    I guess I'm a bit confused. I was not aware you have any control over the order the compiler takes to compile. Would it be possible to post your db here for review? Compact and Repair first and the ZIP it up for posting. Remove any sensitive data of course.
    I can't post it -- security sensitive processes and information. I could email, but first I need to know something about you, e.g., are you a Microsoft employee, which would likely be okay? Grasshopper doesn't have control over the order of the compile; he has just stumbled through it so many times that he knows the order in which shit happens. He is one with the bowl of spaghetti.

  6. #6
    Neophite is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    13
    The private message did not open. However, Shazzam, I managed to fix the error in my ways, and the code/compile, too -- it compiled and it even created an executable database. After thinking about several points you had previously made, e.g., about global variables in the compile process, I figured out that there was something else afoot other than my solution jumping to the phantom global variable problem. After I closed the compiler each time, and then went back and looked at the forms, properties, etc., I then would get error messages galore due to the fields containing global variables being cleared in the process. So, I methodically went through the compile and whenever and wherever the compiler puked, I either moved the snippet of code to where it logically belonged in the sequence of events (if it was out of sequence -- before its time), re-wrote it, or deleted it because it was redundant, a lame duck or it had outlived its intended purpose. Problem solved -- pilot error. Perhaps you should go by Rural Yoda.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! It is *always* better if you can track down and solve your own issues. Much more to learn that way.

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

Similar Threads

  1. bibliographic database project help please
    By blueskyfree in forum Access
    Replies: 1
    Last Post: 03-21-2013, 12:00 AM
  2. When To Compile A Database
    By Aaron5714 in forum Access
    Replies: 2
    Last Post: 11-27-2012, 06:56 PM
  3. Automatically compile database
    By kevins in forum Programming
    Replies: 10
    Last Post: 08-28-2012, 07:24 AM
  4. Need Help DataBAse Project
    By GuiGui34 in forum Database Design
    Replies: 0
    Last Post: 12-11-2010, 06:32 AM
  5. Replies: 1
    Last Post: 03-23-2010, 04:01 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