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.
Code Library How to Safely Disable Controls in Microsoft Access I *never* set the Enabled property of a form control directly. Instead, I use a convenience function so that I don't have to worry about run-time error 2164.
Code Library CaptionCheck(): Verify All Forms and Reports Have a Caption This simple pre-deployment check will help save you the embarrassment of forgetting to set your form or report captions.
Code Library Creating Form Skeletons with VBA The DesignNewForm() routine is a good starting point for creating your own procedure to generate new form skeletons with a consistent UI design.
Code Library Calculating Federal Holidays in VBA: Juneteenth Update An update to my VBA FederalHolidays(), IsBusinessDay(), and WorkingDayCount() functions with support for the new Juneteenth holiday.
Code Library Converting VBA Long Color Values to RGB The VBA RGB() function converts red, green, and blue values into a VBA long integer color value. This simple function works in the other direction.
Code Library Dt() Function v3: Refactoring with Automated Tests Reader Brenda Bachtold provides a more readable version of my date-wrapping function. Automated doc tests prove that her version functions the same as mine.
Code Library Dt() Function v2: Handling Time-Only Date Values An important bug fix for my previously published date-wrapping VBA function that addresses an issue integrating time-only values with SQL Server.
Code Library GetLatestOledbProvider(): Use VBA to get the Latest SQL Server OLE DB Provider This simple VBA function will check the user's registry and return the latest OLE DB provider from a list of supported providers that you can customize.
Code Library GetLatestOdbcDriver(): Use VBA to get the Latest SQL Server ODBC Driver This simple VBA function will check the user's registry and return the latest ODBC driver from a list of supported drivers that you can customize.