MS Access – How To Send An Email

E-mail

Now here’s a question we see all the time in the various forums.

As usual, there are a number of ways to accomplish this and which one you should use has a lot to do with your needs and abilities.

In this post, I’m going to briefly discuss the 3 most popular approaches:

So let’s dive in!

Continue reading

Microsoft Access Runtime

I thought I’d take a second to explain what Microsoft Access Runtime is, and is not.

What is Microsoft Access Runtime?

In the simplest terms, Microsoft Access Runtime is a stripped down version of Access in which the developer/design tools have been removed/disabled, including VBA tools. So you can run existing databases, run their code, …, but any ability to edit them (objects or code), create new objects, etc is disabled or removed.

I also want to be 100% clear here, runtime locks down editing the database objects and code, not the data itself.  So in runtime, users can still fully work with the data as you have allowed them to do (full CRUD).  It just limits their ability to alter the actual “program”.

The primary purpose of the Microsoft Access Runtime version/edition is to enable people who don’t already have Microsoft Access installed to get a free version that allows them to fully work with any existing Microsoft Access database or in some instances it is a means to restrict the end-users abilities to edit the database (even if they already had the full version of Access)

What is Microsoft Access Runtime Used For?

As mentioned above, Microsoft Access Runtime is typically installed for users that do not already have a Full licensed version of Access.  So long as your user does not need to create and/or edit database objects such as: Forms, Report, VBA code, … then the FREE Microsoft Access Runtime will be perfect for them and allow them to run and use any existing database.

So with Microsoft Access Runtime you can fully utilize any existing database solutions, you simply can’t develop them!  You can still use forms, reports, execute the macros & code contained within, you just can go into design view, enter the VBA Editor (VBE), …

So Runtime allows you to distribute your database to user that do not already have Microsoft Access at absolutely no cost!  Since Office 2007, Microsoft Access Runtime is Free.

Something To Consider
Some developers will actually install the runtime version, regardless of whether or not their users already have the full version of Access installed, because it adds an additional layer of security to their databases and restricts what their users can change.
Continue reading

MS Access – Back-End Environment Switcher

Any experienced developer knows all to well that you need to segregate Production and Development versions of a database.  Moreover, most will even have a 3rd environment, a Testing environment.

Now, one can always use the Linked Table Manager, with all its flaws (both in design and in functionality), and manually go through the dialogs and relink the tables, but often we see questions on forums regarding a better method for people, such as developers, who need to do this regularily.

So, I decided to see what I could put together and this is what I came up, The Back-End Environment Switcher, with for the typical setup.

It has three components:

  • Menu
  • The Environment Switcher Settings
  • The Environment Switcher

The Menu


Continue reading

Access Attachment Gallery

This is yet another proof of concept that I developed while trying to help someone in a forum. The simple idea here was to be able to display multiple attachments in one view rather than needing to go through them, one by one.

In the example below, we have a main ‘Product’ form with a ‘Product Images’ subform which will display the various image associated to the currently shown product.

What I’m Working On

The above proof of concept is very simple and satisfied the person’s need, but I wanted to take thing further and make it a complete attachment management tools.  So I’ve been working, and am currently testing, the next version which will include

  • Having no limit on the number of attachment that are displayed
  • Ability to navigate – scroll through the attachments
  • Ability to save the attachments to a location of your choosing
  • Ability to Add new attachments to the current record
  • Ability to Delete the selected record
  • Selected attachment gets highlighted
  • etc…

Here’s what it will look like

Continue reading

Access – Bug – Can’t Automate Toolbar Property

Software Bug

In some cases, especially when trying to upgrade older databases (mdb -> accdb) it becomes useful to automate certain processes instead of having to manually edit every form/report … One aspect that can be very useful to automate is the switch from using a Toolbar to a Ribbon, as Toolbars get relinquished to the Add-in tab which is less than ideal.

In a recent discussion with MVP Alumni Bill Mosca he brought to our attention an issue he was having trying to perform such an update. After some digging and testing, we were indeed able to confirm that there appears to be a bug in VBA with regards to trying to set a value for the Form/Report Toolbar property.

So a line such as the following does not work

Reports("YourReportName").Report.Toolbar = ""
'Or
Reports("YourReportName").Toolbar = ""
'Or
Reports("YourReportName").Report.Toolbar = "YourToolbarName"

Continue reading

Naming Conventions

What is a Naming Convention?

A Naming Convention is simply a standard rule (could be through the use of prefixes, suffixes, typographical convention (syntax styling) such as CamelCase, …) that you apply when creating names for :

  • Objects
    • Tables
    • Queries
    • Forms
    • Reports
    • Macros
    • Modules (See VBA Components)
  • Table Fields
  • Controls (Forms & Reports)
  • VBA Components (Modules, Class Modules) & Variables…
Not Just An Access Thing
This is true in any programming language and not just an Access, MS Office or VBA thing.

Why Use a Naming Convention?

Simple, to standardize your work and make it easier to follow.

For instance, take a simple example of

Public Sub Demo()
    For cars = 0 To 10
        Accident = DateAdd("d", cars, Date)
        Debug.Print Accident
    Next cars
End Sub

what is Accident and cars?  Strings, Integer, Long, …?

Now, if you implement a basic naming convention and prefix all your VBA date variables with dt for Dates and i for Interger numbers you get
Continue reading

MS Access – How to Manually Update Access/Office 2016

With all the ongoing issues with Access/Office 2016 and the updates coming out of Microsoft, it has become a necessity to know how to Update and Revert (Microsoft’s new term for Uninstalling Updates) Access.  I’ve already tried to cover the subject of Reverting your Office/Access installation in my previous post Microsoft Office 365 – Uninstall an Update.  So today, I thought I’d cover the subject of performing a manual update.

Unlike Reverting, Updating is surprisingly easy!

Continue reading