Access JumpStart 2.0 | Blog

A Rapid Development Framework for Microsoft Access

This writing is specific to my Access JumpStart framework I’ve developed alongside Steve Halder for making our development projects more reliable and less time consuming.

For a particular customer, I have a local development Access environment where I make changes to the program and a remote production environment where I deploy the new application.

In order to deploy the app easily each time, I’d like to have a script I can run in the app itself that will make all the changes I normally need to make prior to copying it live. So I will go over this step by step in how I write the deployment script.

First I need to recall the steps from memory or look at a todo list I’ve hopefully created to help me be consistent with the process.

  1. Make a copy of the current front end to update to make deployable. I will copy the front end into a subfolder of the current directory and call it “MakeLive”. Then when I’m done I will simply be able to copy this new file to the customer’s live environment. I will add code for this step in tomorrow’s update.
  2. Update configuration settings. Since I am using my AccessJumpStart framework, I can easily switch several settings between dev and live by updating options in my tblAJSoptions table in my front end DB. To automate, the script should update the value in “OptValue” where the column “OptName” is “AJS_ProdOverride” to “my table that contains the override values for the live configuration “tblAJS_OO_Live”. This will change the following configurations of my app with one SQL statement:
    • Change remote table links. In AJS remote databases are defined in tables, so I have one set of database connections in a live table and another in my dev table. The option override will have the correct remote databases already configured for that environment.
    • Change database properties settings like UseMDIMode for setting the tabbed or windowed interface, AllowBypassKey, AllowSpecialKeys, and others that I would like set a certain way for development to make it easier on myself, but that make the database easier to use and/or more secure when it goes live.

So, to do everything involved with step one, since I’ve already created 2 configurations for my database, one for live and one for my dev laptop, I just need to start with the following to update the configuration for the live:

Public Sub Deploy()
   ' Step 1 - TODO: Create a copy of myself in the Current Project's MakeLive folder
   ' Step 2 - Then we will need to set a reference to that database and update
   '   the table in that database to be set for the live system.
   Dim dbLive As DAO.Database
   Set dbLive = DAO.OpenDatabase(CurrentProject.Path & "\MakeLive\" & CurrentProject.Name)
   dbLive.Execute "UPDATE tblAJSoptions SET OptValue='tblAJS_OO_Live' WHERE OptName='AJS_ProdOverride'"
   dbLive.Close
   Set dbLive = Nothing
End Sub