Truthy and Falsy Values

“Truthy” and “Falsy” Values

VBA is quite very loose in what it deems “truthy” and “falsy”. For example, this procedure can produce surprising result: At the first glance, it seems expected that if the bit field is set to , it would succeed. But in fact, it wouldn’t because is equivalent to , not . Unless we convert the…

Prefer compile time errors over run time errors

In VBA, there are several features that allow us to do things that may not be checked at the compile time. In particular, it is possible to write several late-bound expressions which means that it can potentially contain run-time errors. One common misconception about late-binding is that it’s a matter of adding a reference and…

Use TryGet pattern for transient values

A number of objects may have extra properties or something where it might not exist for all instances. A good example might be finding property on an variable: Not all controls have a property and thus can fail to run. A common approach is to use OERN: This will work OK but this can significantly…

Access 2003

Access 2003 Technical Articles

In this section of the MSDN Library, you’ll find technical articles that demonstrate how to build and deploy complex Access 2003 runtime-based solutions, automate Access from another application; use the new XML features in Access 2003, and even how you can animate Access 2003. You can use the TOC to your left to navigate through…

#LateBind Constant

In standard code, we make use of #LateBind conditional compilation constant, which is typically defined via project’s Conditional Compilation Argument in the dialog: NOTE: The dialog can be found via Tools → <project name> Properties, which is located below the Options menu item. The menu item caption will be different as it includes the project…

Access Developer Extensions

Access 2007: Access Developer Extensions

The Microsoft Office Access 2007 Developer Extensions make it easy to deploy and manage solutions built using Microsoft Access. The Access 2007 Developer Extensions provide packaging and deployment tools and licensing and distribution agreements to make it easier for developers to bring solutions to market. Whether you are working in a small business or a…

ID vs Code

There are cases where a table’s primary key is referred to often in the code. In fact, it might have some special meanings in code. It is highly encouraged to avoid the use of or (or any auto-incrementing schema) for those keys because it is also usually desirable to create a VBA that corresponds to…