MS Access – Securing Access to the Back-End Database

Limit the settings within your database

Go into the database Options (Office Button->Access Options->Current Database) and uncheck elements such as:

Display Navigation Pane

Optionally:

Allow Full Menus
Allow Default Shortcut Menus

While you are there ensure that Track name AutoCorrect Info is not checked. As well, you should not ever use Compact on Close.

Control the type of file your distribute

Be sure to convert (Database Tools->Make ACCDE) your front-end into an *.accde file for distribution to your users.

Remember that error handling within your procedures becomes very important in mde/accde since users cannot debug the code.

Remember though that you need to always keep the accdb, since that is the format that allows you to continue development.

Make your own Ribbon

If you were to create your own Ribbon(s) and disabled all the built-in ones and hide the nav pane, you could basically completely limit what the user sees, and has access to. Thus they would only be able to open whatever you’ve created buttons, and other controls, to open.

Security

Either create a login form, or a table that you cross-reference the active network usernames against to stop nosy employees from getting into the database in the first place.

I also urge you to take a look at Allen Browne excellent post: http://allenbrowne.com/ser-69.html

Folder Permissions

Set the Back-End folder permission to ‘Traverse permissions’: “it allows users access to a folder on a network share without them being able to see the folder without knowing its full address. Essentially they have access to a dummy folder on the share, but they can’t access the storage folder unless they know the exact address.” – Scott Gem

Also setup the permissions on the folder so that only your specific users can access it.  This will  stop users who have no business in your database from ever being able to see it, let alone mess around with it.

Disable the SHIFT Bypass

Password Protect the Back-End

Disable AutoKeys

Set your Table To Hidden

VBA – Read a File From a Webserver or Internet Website

I while back I needed to be able to read a file off of a web server. I found a couple ways to do so:

  • FTP into the webserver (assuming it is your web server and you have a valid login) and download the file locally, then read it like you would any other file
  • Use some browser automation (IE) to access the file and read it
  • Use the MSXML library to read the file

Using the MSXML Library to Read a File on a WebServer

The latter ended up working the best to suit my needs.  So I thought I’d show you a very simple function which allows you to do so in the hope it could serve someone else trying to do the same thing. Below is some sample code of how it can be done:

Continue reading

VBA – List of Files within a Folder and Get their Properties

I was trying to help user mezentia on UtterAccess.com with getting a list of files contained within a folder with their respective properties (size, date created, date modified, last accessed, …), below is a link to the particular discussion thread:

finally created a small demo database to illustrate how it could all be pieced together in a seamless manner. As I have seen a number of similar questions over the years, I thought I would add it to my blog in the hopes it may help someone else out.

Although there are a few build-in functions (such as: FileLen() – do not FileLen() as it is unreliable!, FileDateTime()), because we needed other more advanced properties, at the end of the day, the easiest method to get such information is to use the File System Object (FSO) to extract the relevant information regarding each file and I demonstrate how this is done.

To illustrate how you can use FSO, here is a simple VBA example of how you can get some basic file properties

'---------------------------------------------------------------------------------------
' Procedure : FSO_GetFileInfo
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Retrieve some basic file information
'               Right now, print result to the VBA immediate window
'               Could return an Array, Dictionary Object, ...
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: Uses Late Binding, so none required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sFile     : Fully qualified path & filename with extension of the file to report on
'
' Usage:
' ~~~~~~
' FSO_GetFileInfo "c:\Tests\myXLS.xls"
' FSO_GetFileInfo "c:\Tests\myMDB.mdb"
'
' Revision History:
' Rev       Date(yyyy/mm/dd)        Description
' **************************************************************************************
' 1         2017-09-01              Initial Release
' 2         2021-12-19              Updated proc Name, variable naming to standardize
'                                   Added all available properties
'                                   Added Early Binding sample declarations
'                                   Updated Copyright
'                                   Minor update to inline comments
'---------------------------------------------------------------------------------------
Public Function FSO_GetFileInfo(ByVal sFile As String)
    On Error GoTo Error_Handler
    'Early Binding
    '**********************************************************************************
    '    'Requires a reference to 'Microsoft Scripting Runtime' library
    '    Dim oFSO                  As Scripting.FileSystemObject
    '    Dim oFSOFile              As Scripting.File
    '
    '    Set oFSO = New FileSystemObject
    'Late Binding
    '**********************************************************************************
    Dim oFSO                  As Object
    Dim oFSOFile              As Object

    Set oFSO = CreateObject("Scripting.FileSystemObject")
    '**********************************************************************************
    '**********************************************************************************
    'Invariable Code regardless if Early or Late Binding is used
    Set oFSOFile = oFSO.GetFile(sFile)

    With oFSOFile
        Debug.Print "Attributes:", .Attributes
        Debug.Print "Created:", .DateCreated
        Debug.Print "Accessed:", .DateLastAccessed
        Debug.Print "Modified:", .DateLastModified
        Debug.Print "Drive:", .Drive
        Debug.Print "Name:", .Name
        Debug.Print "Parent Folder:", .ParentFolder
        Debug.Print "Path:", .Path
        Debug.Print "Short Name:", .ShortName
        Debug.Print "Short Path:", .ShortPath
        Debug.Print "Size:", .size                'Remember FileLen() is unreliable!!!
        Debug.Print "Type:", .Type
    End With

Error_Handler_Exit:
    On Error Resume Next
    If Not oFSOFile Is Nothing Then Set oFSOFile = Nothing
    If Not oFSO Is Nothing Then Set oFSO = Nothing
    Exit Function

Error_Handler:
    MsgBox "The following error has occurred." & vbCrLf & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Source: FSO_GetFileInfo" & vbCrLf & _
           "Error Description: " & Err.Description, _
           vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Function

The demo illustrated how the above can be adapted to inventory a whole directory of files and log it to a table for easy review.

Disclaimer/Notes:

If you do not have Microsoft Access, simply download and install the freely available runtime version (this permits running MS Access databases, but not modifying their design):

Microsoft Access 2010 Runtime
Microsoft Access 2013 Runtime
Microsoft Access 2016 Runtime
Microsoft 365 Access Runtime

All code samples, download samples, links, ... on this site are provided 'AS IS'.

In no event will Devhut.net or CARDA Consultants Inc. be liable to the client/end-user or any third party for any damages, including any lost profits, lost savings or other incidental, consequential or special damages arising out of the operation of or inability to operate the software which CARDA Consultants Inc. has provided, even if CARDA Consultants Inc. has been advised of the possibility of such damages.

Download a Demo Database

Feel free to download a 100% unlocked demo copy by using the link provided below:

Download “Access - List Files and Get File Properties (x32 accdb)” GetFileListAndSpecs.zip – Downloaded 55796 times – 48.48 KB

Extended Properties

If you are looking to retrieve Extended Properties, Exif Properties, …, things that cannot be retrieved using FSO, be sure to check out my article on the subject:

A Few Resources on the Subject

MS Excel – VBA – Copy One Cell or Range Background to another Cell or Range

I wanted to expand on my previous post MS Excel Copy Gradient from One Cell or Range to Another so i came up with the following function that can handle both Solid and Gradient background fills.

'---------------------------------------------------------------------------------------
' Procedure : CopyBkGrnd
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Copy a Cell/Range's gradient fill properties from one Cell/Range to another
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' FromRange : Range that contains the Background properties to be copied
' ToRange   : Range you wish to copy the Background properties to
'
' Usage:
' ~~~~~~
' CopyBkGrnd Range("B5"), Range("A1")
' CopyBkGrnd Sheet1.Range("B5"), Sheet2.Range("A1:B2")
'---------------------------------------------------------------------------------------
Function CopyBkGrnd(FromRange As Range, ToRange As Range)
    On Error Resume Next
    'Remove any existing settings
    ToRange.ClearFormats
    'Start Applying the new settings
    ToRange.Interior.Pattern = FromRange.Interior.Pattern
    If FromRange.Interior.Gradient.ColorStops.Count = 0 Then
        'Solid Fill Color Properties
        ToRange.Interior.PatternColorIndex = FromRange.Interior.PatternColorIndex
        ToRange.Interior.Color = FromRange.Interior.Color
        ToRange.Interior.TintAndShade = FromRange.Interior.TintAndShade
        ToRange.Interior.PatternTintAndShade = FromRange.Interior.PatternTintAndShade
    Else
        'Gradient Fill Properties
        ToRange.Interior.Gradient.RectangleLeft = FromRange.Interior.Gradient.RectangleLeft
        ToRange.Interior.Gradient.RectangleRight = FromRange.Interior.Gradient.RectangleRight
        ToRange.Interior.Gradient.RectangleTop = FromRange.Interior.Gradient.RectangleTop
        ToRange.Interior.Gradient.RectangleBottom = FromRange.Interior.Gradient.RectangleBottom
        ToRange.Interior.Gradient.Degree = FromRange.Interior.Gradient.Degree
        ToRange.Interior.Gradient.ColorStops.Clear

        For i = 1 To FromRange.Interior.Gradient.ColorStops.Count
            With ToRange.Interior.Gradient.ColorStops.Add(i - 1)
                .ThemeColor = FromRange.Interior.Gradient.ColorStops(i).ThemeColor
                .TintAndShade = FromRange.Interior.Gradient.ColorStops(i).TintAndShade
                .Color = FromRange.Interior.Gradient.ColorStops(i).Color
            End With
        Next i
    End If
End Function

MS Excel – VBA – Copy Gradient from One Cell or Range to Another

There was an interesting question asked on the Excel forum of UtterAccess. For some odd reason, it just intrigued me, and I had to find an answer (even though I am not an Excel guru it just stuck in the back of my mind).

The Question was really straightforward: How can one merely copy the Cell’s gradient fill properties from one Cell/Range to another? In this instance the Format painter was out of the question because they only wanted the fill properties and none of the other properties.

Below is a simple function that does exactly that.

'---------------------------------------------------------------------------------------
' Procedure : Excel_CopyGradient
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Copy a Cell/Range's gradient fill properties from one Cell/Range to another
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' FromRange : Range that contains the Gradient Fill to be copied
' ToRange   : Range you wish to copy the Gradient Fill to
'
' Usage:
' ~~~~~~
' Excel_CopyGradient Range("B5"), Range("A1")
' Excel_CopyGradient Sheet1.Range("B5"), Sheet2.Range("A1:B2")
'
' Revision History:
' Rev       Date(yyyy/mm/dd)        Description
' **************************************************************************************
' 1         2013-05-24              Initial Release
' 2         2018-06-18              Made the code Option Explicit compliant
'                                   Changed Copyright
'---------------------------------------------------------------------------------------
Function Excel_CopyGradient(FromRange As Range, ToRange As Range)
    On Error Resume Next
    Dim i                     As Long

    ToRange.ClearFormats
    ToRange.Interior.Pattern = FromRange.Interior.Pattern
    ToRange.Interior.Gradient.RectangleLeft = FromRange.Interior.Gradient.RectangleLeft
    ToRange.Interior.Gradient.RectangleRight = FromRange.Interior.Gradient.RectangleRight
    ToRange.Interior.Gradient.RectangleTop = FromRange.Interior.Gradient.RectangleTop
    ToRange.Interior.Gradient.RectangleBottom = FromRange.Interior.Gradient.RectangleBottom
    ToRange.Interior.Gradient.Degree = FromRange.Interior.Gradient.Degree
    ToRange.Interior.Gradient.ColorStops.Clear

    For i = 1 To FromRange.Interior.Gradient.ColorStops.Count
        With ToRange.Interior.Gradient.ColorStops.Add(i - 1)
            .ThemeColor = FromRange.Interior.Gradient.ColorStops(i).ThemeColor
            .TintAndShade = FromRange.Interior.Gradient.ColorStops(i).TintAndShade
            .Color = FromRange.Interior.Gradient.ColorStops(i).Color
        End With
    Next i
End Function

I hope this can help someone else out.

Also, you may be interest in my post MS Excel – VBA – Copy One Cell or Range Background to another Cell or Range

Samsung UN55ES6100 55″ 1080p LED HDTV – Review

Well after fighting with our old TV for a couple of month, we finally decided to purchase a new one.  After scouring the web and our local stores, we settled on a Samsung UN55ES6100 55″ 1080p LED (Slim LED TV Series 6 | 6100) HDTV from Costco (best price and doubled the warrantee compared to anyone else in our neighborhood).  Below are some of my thoughts to date:

 

TV in General

The TV is light, slim and has a great picture.

It took all of 30 seconds to unpack, install and have operational.

Most of the features are straightforward to use.

One thing that I was disappointed with was the fact that the user manual is very small, instead Samsung has chosen to integrate the user manual as an e-manual through the TV console.  Personally, I do not like this,  I have been unable to locate many items while trying to learn how to use various features of this TV.

Along the same line, the TV presents menu after menu of settings to tweak image, sound, power saving, … which can be very intimidating.  Why there is no way while in a menu to click a button to get information blows my mind.  Most of the time you will get a brief description, but some are so generic that they really do not help understand the setting whatsoever.

For those receiving the TV signal over the Air, the built-in tuner is excellent.  I was previously using a converter, but once I removed the converter and plug the antenna signal directly into the TV unit, the image quality drastically improved and it picked up channels that neither of the 2 converters I had used to date could identify.

 

SMART HUB

Firstly, I personally find that the SMART HUB is slow to initially load.

Secondly, I would remark to utilize many of the feature available in the SMART HUB you are best to purchase a wireless keyboard and mouse.  Trying to use the onscreen keyboard and moving the mouse is very slow and frustrating!

 

ALL SHARE

Simply put, it sucks (there is no easier way to put it)!  I truly do not understand this slow piece of software.  Why Samsung developed this instead of concentrating more on a better direct (Wi-Fi) connection is baffling.  The software is slow, has to ‘index’ the files you want to share (why?) and is incompatible with many file formats (for instance video files from my JVC camcorder).  One of the main reasons I bought this TV in the first was for the Wi-Fi capability to be in a position to stream videos, pictures.  To date the best method to do so with this TV is still using an HDMI cable, thus bypassing this useless application.  So no need to have the Wi-Fi and SMARTTV aspects since they are not very good.

I will also add that the ALL SHARE software did not install properly the first time I tried to do so and had to perform a reboot of my computer and try again.  It would continuously loop ‘Installing HotFix’ (refer to the image below), over and over.

Samsung All Share Installation Installing Hot Fix Loop

Today, I tried to view some digital camera picture (jpg) and for whatever the reason none of them are not accessible on the TV.  They appear in the AllShare program on my PC, but not on the TV.

Furthermore, after applying an update to the SMART Hub application, certain apps and functionalities seem to be affected.  Just seems unstable (screen colors changes, flicker, …), untested…

These issues are making me regret this purchase.

 

Direct Wi-Fi Connection

Not to sure what to say about this feature, since I have yet to get it to actually work!  I think that says it all.

 

Web Browser

Yet another poor aspect of this TV.  Samsung has put in place a Web Browser, but has created their own version/flavor and sadly it is much slower than any other browser I have used on any PC I have ever used.  It works, but is slower than I expected.

Further testing has revealed a small problem with Samsung’s Web Browser, it cannot open any documents.  For instance, it cannot open a simple PDF file!  Really, in 2013, a browser that cannot open a PDF is useless.  I can understand not necessarily supporting MS Office documents, but a universal format such as a PDF is unforgiveable!

Recently, after performing an update to the SMART Hub application, the external mouse no longer works?!  The mouse appears in the SMART Hub and is operational, yet once the Web Browser loads, the mouse is no where to be found?!  <sarcastic>Samsung continues to impress!!!</sarcastic>

 

 

It is amazing, when I planned on first writing this post, I was thinking that this was a good TV, but the more I write about it the more I am noticing that it has missed the mark on the features for which I bought the TV.  This Samsung SMART TV is turning out to be quite Dumb!  You pay for advanced functionalities, yet most of them do not work properly, so you end up paying extra for no real reason.

I would give this TV, as a TV alone a 9/10.  That said, I would give this TV, as a SMART TV (Wi-fi, SMART Hub, …), a lowly 2/10!

MS Access – VBA – Reset the Table Lookup Display Control Property to Text Box

I recently took over a database in which the previous dba had set a number of table fields to act as lookup displaying combo boxes. This is a horrible thing to do, IMHO, and since users should never directly have access to tables, and should be working through forms, there is absolutely no reason for this in the first place. Now not wanting to have to go through hundreds of tables and countless fields resetting this property manually, I decided to write a simple function to perform this cleanup for me. Hopefully this might help someone else out with this issue.

'---------------------------------------------------------------------------------------
' Procedure : RemoveAllTableLookupCboLst
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Loops through all the tables in a database and removes/resets the Lookup
'             Display Control property to reset it to a simple textbox rather than a
'             combo box or listbox.  Never needed as users should never access tables
'             directly!
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Usage:
' ~~~~~~
' Call RemoveAllTableLookupCboLst
'
' Revision History:
' Rev       Date(yyyy/mm/dd)        Description
' **************************************************************************************
' 1         2013-05-17              Initial Release
' 2         2019-02-23              Updated Header
'                                   Updated Error Handler
'---------------------------------------------------------------------------------------
Function RemoveAllTableLookupCboLst() As String
    Dim db              As DAO.Database
    Dim td              As DAO.TableDefs
    Dim t               As DAO.TableDef
    Dim fld             As Field
 
    On Error GoTo Error_Handler

    Set db = CurrentDb()
    Set td = db.TableDefs
    On Error Resume Next
    For Each t In td    'Loop through each table
        If Left(t.Name, 4) <> "MSys" Then    'Don't mess with system tables!
            For Each fld In t.Fields    'loop through each field
                If fld.Type = dbText Then    'Only modify Text fields
                    fld.Properties("DisplayControl") = acTextBox
                End If
            Next fld
        End If
    Next t

Error_Handler_Exit:
    On Error Resume Next
    If Not td Is Nothing Then Set td = Nothing
    If Not db Is Nothing Then Set db = Nothing
    Exit Function

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Source: RemoveAllTableLookupCboLst" & 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

MS Access – VBA – Find A String In Word Document

I recent was asked the following question in an UtterAccess forum and thought the solution could be useful to someone else down the line.

I have an access database with hyperlinks to many protected word documents (write protection only).
The target is : user enters a search string in access and selects specific protected document.

In the thread I developed 2 possible solutions: (1) Open the document and highlight the search term throughout the document, (2) Open the document and the start the Find dialog and allow the user the control of what they do from that point on.
 

Find and Highlight Occurrances of a Term

One option is to open the document and highlight the search term throughout the document and you can do this by using code like:

'---------------------------------------------------------------------------------------
' Procedure : OpenWordDocAndSearch
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Open the document and highlight the search term throughout the document
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sFileName     : Fully qualified path and filename with extension of the word document
'                 to search through
' sSearchString : The search term to look for
'
' Usage:
' ~~~~~~
' OpenWordDocAndSearch "c:\demo\Test.docx", "The"
'
' Revision History:
' Rev       Date(yyyy/mm/dd)        Description
' **************************************************************************************
' 1         2013-05-15              Initial Release
' 2         2023-10-02              Fix name of function in error handler
'---------------------------------------------------------------------------------------
Function OpenWordDocAndSearch(sFileName As String, sSearchString As String)
    On Error GoTo Error_Handler
    Dim oApp            As Object
    Dim oDoc            As Object
    Const wdYellow = 7

    On Error Resume Next
    Set oApp = GetObject(, "Word.Application")
    If Err.Number <> 0 Then    'Word isn't running so start it
        Set oApp = CreateObject("Word.Application")
    End If
    On Error GoTo 0

    Set oDoc = oApp.Documents.Open(sFileName)
    oApp.Visible = True
    oDoc.Content.Find.HitHighlight FindText:=sSearchString

Error_Handler_Exit:
    On Error Resume Next
    Set oDoc = Nothing
    Set oApp = Nothing
    Exit Function

Error_Handler:
    MsgBox "The following error has occurred." & vbCrLf & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Source: OpenWordDocAndSearch" & vbCrLf & _
           "Error Description: " & Err.Description, _
           vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Function

 

Use the Find Dialog

Another option is to open the document and then start the Edit/Find dialog and allow the user the control of what they do from that point on. To do so, we can use a function like:

'---------------------------------------------------------------------------------------
' Procedure : OpenWordDocAndSearch
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Open the document and the start the Find dialog and allow the user the
'             control of what they do from that point on
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sFileName     : Fully qualified path and filename with extension of the word document
'                 to search through
' sSearchString : The search term to look for
'
' Usage:
' ~~~~~~
' OpenWordDocAndSearchDialog "c:\demo\Test.docx", "The"
'
' Revision History:
' Rev       Date(yyyy/mm/dd)        Description
' **************************************************************************************
' 1         2013-05-15              Initial Release
' 2         2023-10-02              Updated Function name to avoid conflict
'---------------------------------------------------------------------------------------
Function OpenWordDocAndSearchDialog(sFileName As String, sSearchString As String)
    On Error GoTo Error_Handler
    Dim oApp            As Object
    Dim oDoc            As Object
    Dim dlgFind         As Object
    Const wdDialogEditFind = 112

    On Error Resume Next
    Set oApp = GetObject(, "Word.Application")
    If Err.Number <> 0 Then    'Word isn't running so start it
        Set oApp = CreateObject("Word.Application")
    End If
    On Error GoTo 0

    Set oDoc = oApp.Documents.Open(sFileName)
    oApp.Visible = True
    Set dlgFind = oApp.Dialogs(wdDialogEditFind)
    With dlgFind
        .Find = sSearchString
        .Show
    End With

Error_Handler_Exit:
    On Error Resume Next
    Set dlgFind = Nothing
    Set oDoc = Nothing
    Set oApp = Nothing
    Exit Function

Error_Handler:
    MsgBox "The following error has occurred." & vbCrLf & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Source: OpenWordDocAndSearchDialog" & vbCrLf & _
           "Error Description: " & Err.Description, _
           vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Function

MS Access – Database Created with the 32-bit version …

Have you ever developed a database using a 32-bit Access version and then tried to deploy it on a 64-bit version and receive the error: “This database created with the 32-bit version of Microsoft Access.  Please open it with the 32-bit version of Microsoft Access”.

32-bit error when opened on 64-bit version of MS Access

First let me state that it is not recommended to use the 64-bit of MS Access.  So right from the start, this is a bad idea!

Regardless, what is the solution.  Actually, it isn’t a very hard fix.

Make a  copy of the 32-bit database and recompile on a 64-bit version of MS Access.  So basically at the end of the day, you need to start maintaining 2 versions of your db: a 32-bit version and a 64-bit version.  Once you copy over the 32-bit version to the 64-bit version, Decompile the database, Compact and Repair, Compile (address any issue that may arise such as missing references, etc…) and finally Compact and Repair.  Then you can distribute your database or convert it to an mde/accde format…

So yes, as a developer, if you are going to be distributing a database to users who have a 64-bit version of MS Access, then you need to also have a 64-bit version of MS Access.