Passing ownership to Tim Abell.
Fix #15, removing outdated reference to 'scripts' folder that doesn't exist anymore.
added VB_Name back in
Synchronize your Access Forms, Macros, Modules, Queries, and Reports with a version control system.
This repository is defunct. Another person has offered to take ownership of this project, and so it has been passed to him. Please see https://github.com/timabell/msaccess-vcs-integration for the most current version of the project.
This code is built and tested on Microsoft Access 2010. It will probably work in earlier versions, but YMMV.
The Microsoft Access code module in this project provides functions to export and import all of your Access objects to plain text files so that you can use a version control tool to track changes in these objects. For Access objects which are normally exported in UCS-2-little-endian
encoding , the included module automatically converts to the source code to and from UTF-8
encoding during export/import; this is to ensure that you don't have trouble branching, merging, and comparing in tools such as Mercurial which treat any file containing 0x00 bytes as a non-diffable binary file.
This README shows how to synchronize all application code objects from an Access application with a source control system such as Mercurial or Git. (The provided import/export module is agnostic about the actual source control system you use.)
Included in the export/import:
By default, no Tables are exported. You must specify which tables to include in the export/import process. For example you might have "Countries" or "Colors" tables that populate dropdown lists. You shouldn't include regular data tables containing actual records, because this data doesn't belong in version control.
Not included in the export/import:
For the purposes of these instructions, assume your database is called Application.accdb
and it is stored in ~/MyProject
.
AppCodeImportExport.bas
into a new module in your database with that exact name.AppCodeImportExport
and change the constant INCLUDE_TABLES
to list any lookup tables that function more as part of your application code than as client data. (For example, "Countries", "Colors", and things like that.)~/MyProject
folder.Application.accdb
and zip it to Application.zip
using the Send to Compressed Folder command in Windows Explorer.accdb
and laccdb
files, and then add and commit the zipped Access binary file Application.zip
as well as the scripts
folder. Use a commit message like "Initial commit of [name] at version [number]."ExportAllSource
". Wait for the Immediate window to say the export job is "Done."source
folder under ~/MyProject
. Use a commit message like "Initial commit of all source code for [name] at version [number]".ExportAllSource
". Wait for the Immediate window to say the export job is "Done."~/MyProject
. Use an appropriate commit message to describe your changes.ImportAllSource
". Wait for the Immediate window to say the export job is "Done."Application.accdb
and zip it to Application.zip
(replacing the old copy) using the Send to Compressed Folder command in Windows Explorer. Commit the new Application.zip
to your repository with a commit message like "Full application binary for release [number]".AppCodeImportExport
module, they will not be automatically imported when any developer runs the ImportAllSource method. The code skips this file because it causes a conflict when trying to update a module that is actively being executed.