MS Access – Deploying Your Database Front-End to Your Users

We all know that the proper way to setup any multiple-user MS Access database is to:

  • Split the database (Back-End – Tables; Front-End – Queries, Forms, Reports, Macros, VBA, …)
  • Place the Back-End on the a server to which all the users have access to
  • Deploy a copy of the Front-End to each user so they have their own local copy to run the database from.

With this in mind, a very common question in a variety of forums then becomes, how do we deploy a copy of the Front-End to our users and ensure that they always get any updates?

There are a number of possible approaches. such as:

  • bat/vbs script to blindly copy the master Front-End file to the local computer and then launches the database
  • vbs script which checks the current version installed and perform an update if/when required and then launches the database
  • html script which performs any updates and then launches the database
  • Integrating a version check within your database, or creating an intermediary database to perform updates and launch your database
  • use specialized software to launch the database which takes care of this

Below are a few good resources that illustrates each of these:

BAT/VBS/HTML Approach

Devhut.net http://www.devhut.net/2010/09/14/launch-open-an-ms-access-database-using-a-vbscript/
Devhut.net http://www.devhut.net/2010/09/15/launch-open-an-ms-access-database-using-a-vbscript-part-2/
UtterAccess.com Code Archive Easy Front-end Autoupdater For Large (or Small) Database Environ
UtterAccess.com Code Archive Updated Auto Update (and now Publish) MDE Front Ends
UtterAccess.com Code Archive Auto Update Users Front Ends
UtterAccess.com Code Archive Front End Automatic Update to New Version
Bob Larson’s Front-End Auto-Update Enabling Tool
Bill Mosca’s Deploying and Updating Front End Database Applications (at the time of writing this post it was the first item on the page)

Database Approach

Steve Schapel’s Distributing an Updated Access Application to a Network
Danny Lesandrini’s Automatically Deploy a New Access Client
Peter’s Software Application Starter

Specialized Software (Paid)

Tony Toews’ Auto Fe Updater
FMS Inc’s Total Access Startup

3 responses on “MS Access – Deploying Your Database Front-End to Your Users

  1. Gilad

    Hi, Thanks for all of your efforts with this great site.
    Do you know of a way of updating Front End applications via the Web?

    1. Daniel Pineault Post author

      Sure. There are different solutions, but I’d probably use Stuart McCall’s FTP class which can be found at https://bytes.com/topic/access/answers/434183-capturing-ftp-responses-vba (Wayne Gillespie’s reply).

      If all you want to do is download a file, and nothing more, then you could use the following (originally taken from a reply from Doug Steele), I’ve simply added x64 declarations (untested though) and error handling:

      'x64 declaration
      'Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
      '        Alias "URLDownloadToFileA" ( _
      '        ByVal pCaller As Long, _
      '        ByVal szURL As String, _
      '        ByVal szFileName As String, _
      '        ByVal dwReserved As Long, _
      '        ByVal lpfnCB As Long) As Long
      'x32 declaration
      Declare Function URLDownloadToFile Lib "urlmon" _
                                         Alias "URLDownloadToFileA" ( _
                                         ByVal pCaller As Long, _
                                         ByVal szURL As String, _
                                         ByVal szFileName As String, _
                                         ByVal dwReserved As Long, _
                                         ByVal lpfnCB As Long _
                                         ) As Long
      
      Public Function DownloadFile( _
              URL As String, _
              LocalFilename As String _
              ) As Boolean
          Dim lngRetVal             As Long
      
          On Error GoTo Error_Handler
      
          lngRetVal = _
          URLDownloadToFile(0, URL, LocalFilename, 0, 0)
          DownloadFile = (lngRetVal = 0)
      
      Error_Handler_Exit:
          On Error Resume Next
          Exit Function
      
      Error_Handler:
          MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
                 "Error Number: " & Err.Number & vbCrLf & _
                 "Error Source: DownloadFile" & vbCrLf & _
                 "Error Description: " & Err.Description & _
                 Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
                 , vbOKOnly + vbCritical, "An Error has Occurred!"
          Resume Error_Handler_Exit
      End Function

      The you’d use it like

      Call DownloadFile("http://www.domain.com/files/yourfile.txt", "C:\Folder\yourfile.txt")