For this site I'm going to stick to Access and post some samples of my work that hopefully you will find useful in some way. The posted files are meant to be useful as stand-alone utilities, as a component in your larger project or as a resource for selective code lines. A good programmer doesn't try to recreate everything from scratch but builds on existing code that works. In exchange I would greatly appreciate feedback, suggestions, advice and comments on how I can make these offerings better or even just an email telling me that it helped you with a project.

Tigers

Tigers have no natural predators. They love water and are great swimmers. Oh... and they purr as well as roar.

While no two tigers are striped exactly the same (stripes even vary on each side of the animal), all tigers have a set of three lines on their forehead as represented by Wang - the Chinese symbol for King.

This Chinese character features Wang, the Chinese Symbol for King three transverse lines representing the heaven, people and earth respectively.

When linked by the vertical line "|", a character comes into being representing the one owning the absolute authority of the world, the king.

Of the eight sub-species of tiger, three—the Caspian, Balinese, and Javan—are considered extinct, and the remaining five are critically endangered. Estimates put the most numerous of the tigers, the Bengal, at 3,000–5,000 in the wild, primarily in India. This is more than the other four sub-species combined.

Tiger

Downloads



(Binger.accdb Access 2007-Version 0.82 2009.10.12)

This is a demo application that allows you to use a web service interface (via Bing API 2.0) to Microsoft's Bing web search facility.

binger

To use it you must acquire a Bing App ID from the Microsoft Bing developers site at http://www.bing.com/developer and enter it into the application using the "Set App ID" button on the main form.

You must also have a version of Microsoft's XML library (MSXML) installed because the results are returned in XML and this application uses a XML Stylesheet (XSLT) to transform the XML results into Jet SQL statements that are then processed to enter the results into a table.

It demonstrates interfacing with a web service, late-binding COM objects, parsing XML text, using XSL to transform XML into another format (text) and using SQL and Jet to handle the results and display to the user.

User can specify how many results to display initial (50 max) but can page through results (1000 max results).

There is a Access 2000 version included in the .zip - binger.mdb


(Hangman.mdb Access 2000-Version 3.1 2009.09.26)

Here is an Access 2000 .mdb file sample that demonstrates how to subclass a form control to simplify code, enhance functionality and increase scalability. This simple Hangman game has to track 26 command buttons (one for each letter) in the user interface. There are other techniques to handle the click event on these controls but subclassing is elegant, reduces the amount of required code and increases readability. It is an valuable technique to learn.

The MouseOver sample on this page uses the same concept to extend the functionality of the label control within an Access application.


(MetamorphosisDemo.accdb Version 1.00 2009.02.28)

When distributing a new app version to existing clients you may have a need to migrate existing data into a new Back-End database. I use Metamorphosis to do this. Its a class module that migrates data from a user selected database file. You can define table and field mappings in code or you can have Metamorphosis prompt for an XML file. This allows you to provide custom table/field mapping definitions to clients who have custom database schemas. This demo includes four examples of moving data from a legacy back-end. It includes four sample XML data mapping files and exhibits several useful features like the use of SQL as a source or destination, the LITERAL feature for assigning a literal value to a new field and the TRANSFORM feature that runs custom code for fields during the data migration.

A very handy tool for updating existing Microsoft Access back-end .mdb or .accdb database files for existing installations.

There is more information on Metamorphosis on the code sample page and here is a screen shot from the demo.


Compare Two Access Files and Identify Differences

(dbDiff.accdb Version 1.20 2009.09.03)

Ideally you have your source code organized by version or are even using a Source Code management system like CVS, Subversion or SourceSafe. But sometimes you need to compare two Microsoft Access .mdb or .accdb files for whatever reason. Wouldn't it be nice to have a "diff" tool like unix users have?

Access is a proprietary Microsoft product so it would be a big task to do this with the ease and simplicity of the unix command-line diff tool in its text-based world. But dbDiff might be the tool you need.

This is a utility written in Access 2007 to take two Microsoft Access .mdb or .accdb files (doesn't work for .mde/.accde files) and identify differences via a GUI interface with the result presented in the app and as an optional report. Here is a snapshot of the initial screen .

It can identify

  • table differences
  • relationship differences
  • query differences
  • form/report differences
  • module/class differences

in a non-destructive way.

It can handle files with database-level passwords but does not work with apps designed with user-level security (ULS) - those that use an .MDW workgroup file.

It uses external diff type programs to display code level changes. You can use any of the following programs to see code diffs:

  • GNU Diff 2.8.7
  • WinMerge 2.2.4.0
  • Visual Studio's WinDiff 5.1
  • Compare It! 3.86
  • ExamDiff 1.7
  • kDiff 0.9.92

I've actually tested the program versions listed above but dbDiff is flexible enough that it can handle other diff programs after some setup by you.

Here is a screen-shot that shows how you can add missing objects to a database and how you would inspect differences between like-named objects.

Version 1.19 allows tables to be compared (schema only - not data) and optionally synced along with some minor bug fixes.


Hover (Mouse Over) Control to Get Status

(mouseOver2k.mdb Version 1.0 2008.9.27)

Screen real estate is a precious commodity. Users want information quickly. Using a mouse-over or hover technique to alter the display of data is a valuable feature for users. Combining color with hover over techniques let's you provide at least four levels of data. Let users click on the label (control) to "drill-down" and get more specific data.

By sub-classing the label control (in this example) you can sink events (using the "WithEvents" keyword) for that control and manage how that control behaves.

This Access 2000 sample demonstrates mouse-over subclassing and continuous form-like behavior in an unbound form.

Here is a screen-shot of this app in action.


Display Images in a Continuous Form

(imgForm.mdb Version 1.0 2008.07.06)

A common user request is to display images in Access's continuous forms. Access 2007 makes this easier but earlier versions don't support this. I did it by using an unbound form and making it look/behave like a continuous form. Like most programming tasks anything is possible if you are willing to design, build and test it.

This is a basic proof of concept type of application but I believe it demonstrates all the needed behavior.

Here is a screen-shot of this app in action.


Wizard Creation Tool

(Wizard1.accdb Version 1.0 2008.07.21)

A common user request is to create a wizard-like interface to step a user through the process of entering some type of data or set of related info. Wizzards request data input in a step-by-step fashion and provide users with the ability to "step back" or even to cancel the process of accepting user input of data.

This sample app may provide a foundation for more involved user interaction or may be sufficient for simple needs.

Here is a screen-shot of this app in action.