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.
Code Library weArrowKeyNav Class Do you want the up and down arrow keys to move to the previous and next records in a continuous Access form? Here's how to do that with only two lines of code.
Code Library Get Top Form By Control How do you return the top form for an arbitrary control instead of the first subform that comes your way?
Code Library Microsoft Access: Check if Form Object is a Subform How do you check if the form object is a subform in Access without triggering a runtime error? Hint: this is a trick question.
Code Library Get Form By Control Let's use recursion and the TypeOf...Is expression to get the first form parent of any control on our form.
Events The ArrowKeyNav Routine Enable Excel-like navigation in your continuous forms by overriding the default behavior of the up and down arrow keys.