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.
List Fields ListFields() Part 1: Listing Table Fields in the Immediate Window An easy way to reduce context switching between the VBA IDE and the Access application window is to list table field names in the immediate window.
WizHook Sorting Arrays of Strings in Access with WizHook No need to write your own array-sorting code from scratch. Use the SortStringArray method of Access's hidden WizHook object instead!
WizHook WizMsg(): A Simple Way to Create a MsgBox with Bold Text Bold text in a Microsoft Access message box? It's true. And it requires no API calls, no third-party libraries, and no arcane string syntax. Check out WizMsgBox!
WizHook Wiz(): Never Forget to Set the WizHook Magic Key This convenience function handles setting the WizHook Key property with the required magic value once per session.
TempVars GenerateTVClass(): Auto-Create a TempVars Class Module The culmination of my TempVars series, this article shows you how to generate a TempVars class module from a local table.
Code Library Create a Class Module from a String in Microsoft Access Generate VBA class modules from strings during design time using this simple function in Microsoft Access.
Code Library Writing Boilerplate Code by Hand is for Suckers Writing repetitive code may be a necessary evil in VBA, but it's a lot less tedious if you generate most of it in VBA itself.
Code Library WriteTempFile(): A Simple VBA Function to Save Text to a New Temporary File If you need to save a string to a temporary file in VBA, this simple function will do the trick.
Code Library SetPredeclaredId(): Change the Hidden PredeclaredId Attribute of a VBA Class Module This simple function overcomes the lack of a hidden attribute editor for PredeclaredId values in the VBA development environment.
Code Library A GUID-Based Temporary File Name Generator If you need a reliable and fast way to create lots of temporary file paths, a GUID-based filename generator has some compelling benefits.
Code Library Getting the Temp Folder in VBA There are many ways to get the temporary folder in VBA. But if you look behind the curtain, there's really only one...
TempVars tblTempVar: Creating and Populating a Table of TempVars These three simple procedures: (1) create, (2) populate, and (3) create/delete + populate a local table with the contents of the TempVars collection.
TempVars Populating a List Box with the TempVars Collection If you use TempVars in your Microsoft Access applications, this handy function will bring visibility to the contents of that collection.
Video VIDEO: "Codifying" Long Names Former Access MVP Jack Stockton translates my SQL Server "Codify()" function to work with Microsoft Access backend databases.
Code Library ObscureInfo(): Hide Sensitive Information in Access Form Controls Avoid over-the-shoulder attacks and prevent accidental disclosures in your Microsoft Access forms with this easy-to-implement function.
Code Library NewSort(): Sort a Continuous Form by Clicking on the Column Label Sort a continuous form in MS Access by simply pointing at a column label. These functions make it easy.