The Access Wizard Newsletter Tips, Tricks, and Traps for Access Users and Developers
June 2009

Flashcards 105 - The Menu: Make Life Easy

I'm a big fan of food. During one part of my life, I lived as a Peace Corps volunteer in Senegal, West Africa. While there, I ate like the locals, which meant pretty basic food -- things like millet, and rice with dried fish sauce. For those of you who aren't familiar with millet, it's a staple in the diet of a great part of the world. If you have a parakeet or a cockatiel, and you feed it birdseed, most of what you're giving it, is millet.

It was in this era of my life that I became a real foodie; I started cooking and became enthusiastic about new foods and restaurants.

When you're at a new restaurant, the atmosphere is important, but the menu is critical. I don't like menus that are posted on a blackboard, or menus containing type with cutesy little things that make it difficult to figure out what food is being offered. I have a pet peeve about being given a menu in a restaurant where the lighting is so poor or the print is so small that it's really difficult to read.

A database application should use a menu like a restaurant should use a menu. It should highlight the things that are most important on the very first page and allow the user to get around as simply as possible. This month, we'll build the menu for our Flash Card program.

In this Issue
  • Tip of the Month - Copy Prior Record
  • The Mechanics of Building a Menu
  • Cosmetics
  • Flexibility
  • Conclusion
  • Trap of the Month - Don't Set Events to Functions

  • The Mechanics of Building a Menu

    Building a basic menu is a fairly straight forward process, which I covered in the March 2005 version of the Wizard, so I won't go into detail here about the mechanics. Rather, I'll focus on utility and the philosophy of menus.

    Here's my starting point for the Main menu:

    As you can see, we have a few things going on:

    • A welcome message at the top.
    • A picture to add visual interest on the left-hand side.
    • A versioning indicator on the lower left-hand side.
    • The menu itself in the middle.

    Clicking an item in the menu will do one of several things; it will either bring you to a form or a submenu, or will exit the program.

    The Reports item will open a reporting engine. Tools will bring up a sub-menu that has various utilities for the application.

    The final item provides a graceful exit from the program. Behind the scenes, I'll typically do some housekeeping when the user exits.


    Notice I have a picture in the menu. This is intentional, and adds a little bit of interest to the opening form. I am not an artist, so I don't even try to create my own pictures. Instead I go to Google and type the name of a picture that I think makes sense. In this case, I searched on "flashcards," then just browsed around until I found a picture I thought would both look good and convey the concept of the program.

    If you want to try this, go to Google, find a drawing, clipart, or photo, then right click the picture and choose copy. Swap to your Access Application, open your form in design mode and choose edit paste from the menu.

    The title at the very top of the form "Flashcards", in blue, is based on the Switchboard title for the particular menu, so pay some attention. When you are titling your switchboards in the wizard (again, see March 2005 for details), make sure your Top Level Menu items make sense for the Title Area of the Menu.

    The welcome message in black at the top is simply a text box formatted in bold with a sans serif 18 point font.

    You can certainly get much fancier than I have with the welcome line at the top. I just tend keeps things simple. But if I were more artistic, I'd probably play around with that a whole lot more.

    One final note: On the menu, I put the version number and build date in the lower left hand corner. All my applications contain this versioning element. This is based on a versioning table within the application, and the particular text that appears on screen is controlled by code. I'll be reviewing how to put a version on the menu in a future Wizard.


    I find that things become increasingly more complex, as I develop my applications. The menu structure is designed to hold a maximum of eight items on any single menu. For most applications, this works just fine by moving selected items to sub-menus. The built-it menu manager (Tools | Database Utilities | Switchboard Manager) makes it very easy to create and manipulate menu items.

    Occasionally, applications are so complex that they need a completely different menu structure. But those tend to have relatively high design overheads, and I only use them when they're truly needed.


    This month, we designed our flash card program menu. Our goal has been to keep things as simple as possible for the user, and to make things intuitive so that no special training is required to use the program.

    This ease of use and making life simple is something that you should consistently strive for in building applications.

    Trap of the Month - Don't Set Events to Functions

    When you are working with controls on forms and want the form to react to an event by calling a function, you'll meet a potential trouble spot.

    In order to call a function from a form control, you must start with the equals sign, followed by the name of the function, followed by a pair of parenthesis. For example, =LastDayofMonth().

    If you don't include any of these items you'll get very odd and unhelpful error messages from Access. If you have problems in your code that calls the function directly, you'll also get unpleasant and confusing feedback from Access. For these reasons, I tend to avoid hooking functions into properties of controls directly. I think a better approach is to call a subroutine, and then have the code manipulate the control to get the results you want. This is a much more direct way to do this and makes it easier to handle errors.

    Tip of the Month - Copy Prior Record

    If you working in a list form and find that you frequently want to copy the value of the field in the prior record, use CTRL+ ' (apostrophe). This will repeat the value from the prior record into the current record.

    As a bonus, this technique will also work when you're on a single record form. Even though the prior record may not be visible, this trick will still work.

    Quick Links...

    Custom Software Home

    Access Wizard Archives

    Our Services

    Join our mailing list!

    Forward email

    Safe Unsubscribe
    This email was sent to jim@custom-software.biz by jim@custom-software.biz.

    Custom Software | Copyright Custom Software All Rights Reserved | Westford | MA | 01886