Code Library loggerTextFile: Log Messages to Text Files with clsLog--The VBA Logging Framework This "logger" class module integrates with our VBA logging framework--clsLog--to write messages to text files.
Code Library CompileCurrentAccessApp(): Use VBA to Create an ACCDE or MDE of the Currently Open Access File This function allows you to create an .accde or .mde file based on your current Access file with a single press of the F5 key.
Code Library FileIsOpen(): Check If Another User or Process Has a File Locked This simple function detects whether a file is already open in another application allowing you to handle such situations with grace and confidence.
Code Library GetCtlAtMouse(): A Reliable Way to Return the Current Control Object Under the Mouse Cursor in Access In this follow-up to my earlier article on the undocumented AccHitTest() method, we improve how we handle errors when the mouse is over an empty area of the form.
Code Library How to Open a File with its Default Application in VBA One of the handiest functions I use in my Access applications is this gem from Dev Ashish: fHandleFile(). Here's how to make it compatible with 64-bit VBA.
Code Library How to Set the Background Color of the Microsoft Access Application Window with VBA A series of Windows API calls will "repaint" the Microsoft Access canvas with the color of your choice. It is a bit rough around the edges, though...
Code Library GetCanvas(): Convenience Function for Working with Windows API Calls in Access This simple function serves as a great foundation for manipulating the display of Microsoft Access forms and reports with a variety of Windows API calls.
Code Library CenterForm(): Using the Windows API to Center Forms on the Access Canvas The form Auto-Center property is all you need in most cases. However, let's consider four different situations where my custom code might be a better fit.
Code Library GetInnerAccessHwnd(): Retrieve the Window Handle to the Microsoft Access Canvas This function returns the window handle to the Microsoft Access "canvas", the inner portion of the application window where forms and reports are drawn.
Code Library UserPressed(): Break Out of a Long-Running Loop in VBA with the Escape Key This API call captures keyboard input from the user without relying on any of the form keyboard events.
Code Library Automating Temporary Data Cleanup in Access with the ClearTempTables() Procedure The ClearTempTables() procedure is a quick way to empty out temporary tables in your front-end Access files before deploying updates.
Code Library GetInfoForm(): Get User Input Without Needing a Global Form The GetInfoForm() function simplifies the task of returning user input from an unbound form without stashing values in a hidden global form.
Code Library Convenience Function for Passing Values Between Forms via a Hidden Global Form I don't always use a global form to stash user-provided values, but when I do, I use this GetInfo() function.
Code Library High-Performance VBA String Concatenation with clsStringBuilder clsStringBuilder takes a collection-based approach to speed up string concatenation.
Code Library clsConcat: Blazing-Fast String Building Performance in VBA You don't need to understand how to pre-allocate a memory buffer in VBA to take advantage of this blazing-fast string builder class.
Code Library Pause Code Until a Form is Closed or Hidden (without acDialog) Pausing code execution until a form is closed OR hidden can be a handy feature. This function delivers that without the other constraints of acDialog.
Code Library How to Pause Code Execution Until a Form or Report is Closed (Without Using acDialog) Do you need to pause your code until the user closes a form or report but are running into problems using acDialog? This simple function is your answer.
Code Library CascadeForm(): Prevent Multi-Instance Forms From Hiding Behind Each Other The CascadeForm() function introduces the cascading-window effect from the Windows operating system to Microsoft Access.
Code Library 4 Keys to Building Generic Solutions in Code Building and maintaining a library of custom code procedures is an investment that provides compounding benefits over time.
Code Library MergeLines(): A Handy Function for Building Address Blocks This handy little function takes care of the tedious chore of creating multi-line strings devoid of blank lines.
Code Library FirstValidPath() Simplify your VBA code with the versatile FirstValidPath convenience function, which efficiently determines the first valid path from a list of potential matches.
Code Library ShiftDate() Function: Intelligent Date Adjustments The ShiftDate() function provides intelligent date handling for your application by helping preserve month-end dates.
Code Library ptReplaceDeclaredValues(): A VBA Function to Update SQL in Pass-Through Queries Use this function to reliably replace declared values in a pass-through query.
Code Library TryGetForm: Set a Strongly-Typed Form Object in Access VBA The TryGetForm function helps you convert "stringly-typed" code into "strongly-typed" code when working with Access forms in VBA.
Code Library LockControls() Function: Locking and Unlocking Multiple MS Access Controls in VBA This convenient function lets you lock or unlock multiple Access form controls with a single line of code.