VBA – Send Email Using Windows 10 Curl

In a recent discussion regarding automating e-mails in Access someone brought to my attention that Windows 10 has curl built into it, as of build 1803, which allows sending e-mails, amongst many other things.

This got me curious if it could be a viable replace for say CDO Mail.  As such, I did some research, development and testing and ended up with the following function:

Continue reading

Access – System Resource Exceeded

Today I thought I’d try and cover the subject of Access reporting back errors like:

System Resource Exceeded

There isn’t enough memory to perform this operation
Access - Isn't Enough Memory To Perform This Operation

 

What’s the Source of the Problem?

Many report these issues occurring on databases that were working fine for years and once they upgraded Access versions, the newer version would report such an error and then crash.

First, it is important to understand that Access does not access all of a computer’s RAM, so having 16, 32, 64 GB RAM changes nothing to the problem.  Access has access only to a limited amount of RAM which depends on the bitness of your Access installation:

  • A 32-bit installation of Access has a hard limit of 2 GB of virtual memory (4GB total virtual memory => 2GB for Windows and 2GB of processing) regardless of what is physically available on the system itself
  • A 64-bit installation of Access has a hard limit of 8 TB of virtual memory (16TB total virtual memory => 8TB for Windows and 8TB of processing).

Note: The above information regarding the limitation of 32-bit and 64-bit installations comes from the youtube video on LAA given by Karl Donaubauer (Access MVP) for which a link is provided a little further in this post.

As such, a 64-bit version of Access can access orders of magnitude more RAM (if available) and it is thus highly unlikely to see such an error in an 64-bit installation.

Continue reading

Access – Enforce Folder Location

In my article Securing Your MS Access Database Front-End, I stated:

Lockdown Where Your Database Can Run

If you are lucky enough that you are running your db on say a CITRIX server, you can easily add code, as part of your startup mechanism, that verifies which computer is running the current application. If it doesn’t match up with the computer/server name it should be running on, simply close the application.Daniel Pineault

So, today, I thought I’d illustrate the basic principle.

Securing the Back-End

Now, for me, I was more interested in insuring that no one was copying the BE and trying to run off of some personal copy they had made.  As such, I was wanting to insure the BE was in a particular location.  That said, you could just as easily enforce the same principle on the front-end as well.

So the basic idea is very simple and is comprised of 2 steps:

  1. Retrieve the back-end path of a linked table
  2. Compare it to a set value and act accordingly

Continue reading

Access – Linked Table Path and FileName

There are numerous instances in which it can be useful to be able to retrieve a linked table’s path and filename, things like:

  • for linkings at the startup
  • for locking down the database so it will only run from certain instances
  • etc…

The good news is that this is pretty easy to achieve once you know that the each table’s definition stores this information within the Connect property or that you can query the MSysObjects table for this information.

Continue reading

Internet Explorer Automation Dead?

RIP IE

The writing appears to be on the wall for Internet Explorer, and by extension Internet Explorer automation.

Internet Explorer 11 desktop application will be retired and go out of support on June 15, 2022Microsoft - Windows Blog
Microsoft Edge with IE mode is officially replacing the Internet Explorer 11 desktop application on Windows 10. As a result, the Internet Explorer 11 desktop application will go out of support and be retired on June 15, 2022Microsoft - Tech Community

So if you have application utilizing Internet Explorer automation, start planning now!

Continue reading

Access – AutoSize SubForm with Main Form Detail Section

I was working on a Form with an embedded subform.

In the Form’s header were a series of controls to perform a search and the subform would display the results to the user.  The issue was that I would setup the design, maximizing the subform within the main form’s detail section, at least within my screen resolution, but when distributed to my users it would present blank area because they had higher resolution/DPI.

Thus, I set out to resize the subform automatically based on the users screen.
 
Continue reading

Access – TempVars

Today, I thought I’d discussion a great feature that was added to Access 2007+, TempVars.

There used to be an excellent WIKI article on UtterAccess.com that covered this subject and I used to simply refer people to, but it is no longer, so I decided to create this post in the hopes that I could replicate the information lost and helps other developers.

What are TempVars and Why Use Them?!

TempVars are ‘sort of’ like global variables.

Then why use them you may ask, why not just use traditional Global Variables?

Excellent question! TempVars offer several benefits, mainly:

  • They are global in nature
  • They are no affected, reset, by VBA runtime unhandled errors
  • They can be used directly within queries, forms, VBA
  • They can be create/modified with macros and VBA alike
  • Can accept different variable types automatically

Continue reading

Access – Basics of Query Criteria

Today, I thought I’d write up a small post on one of the most common huddles that new developers face which is building proper query criteria.

The issue most novice developers have is the simple fact that they don’t yet know the fact that they have to adjust each criterion based on the field data type they are applying the criteria to.  Thus, you cannot treat all criteria the same!

So I thought I’d break down the basics and show a few simple examples.

Main Data Types of Concern

When writing queries in Access you need to differentiate the fields by their data type (from the table design) and break them down into 3 categories:

  • Numeric
  • Text
  • Date/Time

and then build each criteria accordingly.
Continue reading