Code Library Show a Friendly Message When a Report Has No Data A handy function you can call from an Access report's Property Sheet to gracefully inform the user when their report has no data to display.
Code Library Printf Function User @wqweto's string interpolation VBA function has some neat tricks, like using Unicode's Private Use Area to get safe temporary placeholder characters.
Code Library Displaying Very Long Human Readable Time Spans With 29-million-year time spans, you can handle almost any task (besides evolution, continental drift, and adding the LAA flag to MS Access).
Code Library Displaying Human Readable Time Spans The HumanizedSeconds() and ConvertToSeconds() functions work hand-in-hand to provide a general solution for storage and display of time spans.
Code Library The Pluralize Function You don't have to settle for messages like, "1 record(s) inserted." This simple function is an easy way to format strings for pluralization in VBA.
Code Library How to Check If Two Variant Values Are Equal (or Not) in VBA While tempting, you can't simply use the equality (=) or inequality (<>) operators to compare Variant values in VBA. Here's a safer alternative.
Code Library How to Return the Precision and Scale of a Decimal Field in Access There's no way to use DAO to return the scale and precision of a Decimal field in Access. Luckily, there's an easy workaround using ADO.
Code Library Convert CIDR Notation to IP Address Range in VBA A VBA function to convert from CIDR notation (192.168.1.1/24) to the corresponding IP range (192.168.1.0 - 192.168.1.255).
Text-To-Speech Reading Text Aloud in Microsoft Access Want a quick way to get started with Text-to-Speech in your VBA application? This 4-line method gets the job done and requires no references!
Code Library How to Remove Special Characters from a VBA String A simple function to remove special characters from a string in VBA. Useful for sanitizing file names, sheet names in Excel, and lots of other stuff.
Code Library Automatically Cleaning Up Temporary Files on Program Exit A dead-simple way to clean up temporary files without having to worry about waiting until they are no longer in use.
Code Library How to Check if VBA is Running in 64-bit Mode A simple function (or class property) that returns whether the VBA code is running under 32-bit mode or 64-bit mode.
Code Library A Function to Quote Literal Dates When Building SQL in VBA This improved version of my date-quoting convenience function eliminates a common source of date-handling ambiguity via the ISO date format.
Code Library A Safer Alternative to BETWEEN When Filtering Dates This convenient function generates defensive SQL statements to help you avoid the subtle dangers of the BETWEEN statement when filtering dates.
Code Library Preventing File-Writing Race Conditions in VBA If you're waiting on an external process to write a file to disk, how can you be sure it's really done? This routine helps avoid (or at least rule out) some race conditions in VBA.
Code Library Converting the DataTypeEnum Values to Equivalent VBA Types Two simple functions to convert DataTypeEnum values to descriptive strings and their VBA data type counterparts.
Migration Mystery of the Ancients The Ultimate Guide to Recovering Password-Protected, Access 97 Format .MDB Files
Code Library Quickly List the Properties of an Object in Access Here's a quick and dirty procedure to iterate through an Access object's Properties collection.
Code Library How to Safely Hide Controls in Microsoft Access I *never* set the Visible property of a form control directly. Instead, I use a convenience function so that I don't have to worry about run-time error 2165.
Code Library Fix for the error: "You can't hide a control that has the focus" in Microsoft Access The DefocusIfActive() procedure shifts the focus away from a control so that it may be hidden or disabled.
Convenience Functions The TrySetFocus Convenience Function The TrySetFocus function attempts to set focus to a control. If the operation succeeds, it returns True; otherwise, it returns False.
Code Library How to Highlight the Current Record in a Continuous Form Step-by-step instructions for applying a custom highlight to the currently selected record in a continuous form in Microsoft Access.
Code Library The One Function Every VBA Developer Needs in a WithEvents Class Your WithEvents event handlers will only run if you set the event property to "[Event Procedure]." Here's a safe and easy way to do that.
Combo Boxes Combo Boxes and Target Sizes Just like in darts, it's easier to hit a larger target when using the mouse. With this in mind, let's make our combo boxes more user-friendly.
SQL Server Pushing Field Comments to SQL Server A VBA routine that takes field comments from a front-end linked table and pushes them to the corresponding back-end table in SQL Server.