| DatabaseLessons.com |
'Serving the Microsoft® Access |
|
|
Version NumbersI use a very simple naming convention for version numbers. I also make it easy for me to add comments about each new version, and for the users to know what version they are using. Here is the overall plan:
First the table, tblVersions. Here are the obvious fields that we need. (by the way, this table is stored in the "front end" in a proper frontend-backend setup so that the developer always has power over the newest entries)
Here is a sample record from the table.
Note that the primary key (version number) should be sorted in descending order so that the most recent modification shows first. As you can see from the example, I like just using the release date for the version number. The purpose for the alphabetic character at the end is to allow for more than one version on a specific date. After all, I am not perfect and maybe 2 major bugs are discovered on that date!!! Now, on to the form for adding new versions. I usually get lazy and make this form a simple "bound" form, complete with default navigation buttons. Since it is not meant for normal user interaction, this works fine. The final step is to add a label on the Main Menu form that is used to activate the form. I usually put it in the bottom left corner of the form. Call this label "lblVersion" and add a double click event for it. Here is the code: NOTE: All the VBA code segments on the Database Lessons site assume that you have DAO references active. If you are not sure what this means, and you are using Microsoft Access 2000 or higher, click here.
What was that scream I heard? Yes, I admit, I have broken a rule; I used DMax. Like I said, I am lazy, and that table will NEVER be upscaled to SQL Server, etc. I also add that line of code [lblVersion.Caption = DMax("[strVersion]", "tblVersions")] to the Open event of the Main Menu so that the user always sees the current version number. Now when my user calls about a problem I can ask them for their version number. If they are curious they can double click on the label and read the system's history! the following is an advertisement for a new collection of Health and Wellness Information products being promoted by our sister site at www.nutritionlessons.com
Happy Coding |
|
|
© 2006, 2007 Richard W. Killey. All Rights Reserved. |