mobile databases, mobile forms, and mobile synchronization … where you need to work
Providing Pocket Access, Mobile Database, Windows CE Database, and Windows CE Development Solutions

Tip of the Month (March 2006)

Navigational Dropdowns

Normally, changing the value in a dropdown changes the value in the current record. For example, in a PERSON form, a dropdown with three options (Blue, Brown, and Green) could be used to enter the eye color. If you are on Fred's record, selecting Brown from the dropdown would set Fred's eye color to Brown.

However, sometimes you may want the dropdown to be navigational. That is, instead of changing the value in the current record, you want to move to another record. For example, in the PERSON form, a dropdown with the names of the people (Fred, Mary, and Tom) could be used to move from one record to another. If you are on Fred's record, selecting Mary from the dropdown would move you to Mary's record (as opposed to changing Fred's name to Mary in the current record).

Starting in Visual CE 10.0, it is easy to create a navigational dropdown. When you first create the dropdown, select a column that is indexed. Then, in the dropdown properties, turn on the "Navigational" checkbox.

If you have an older version of Visual CE...

By default, Visual CE dropdowns are not navigational. To create a navigational dropdown...

  1. Open (or create) a form over the PERSON table.
  2. Select FILE | MODIFY TABLE to see if there is an index on the NAME column. Create the index if there isn't already one.
  3. Create a named macro, with four buttons:
    1. Start of macro: Name your macro MOVE_ME
    2. Sort by: Sort on the NAME column.
    3. Record search: Turn on "Exact matches only", and select @var(52) as the argument.
    4. Return from macro
  4. Turn on the "continue" flag for second and third buttons of the named macro.
  5. Create a dropdown control. When asked to select a column or variable, select @var(52) (not NAME). Set the properties as follows:
    • Turn on "Include values from table" and select the PERSON table.
    • For the "Names:" pick the NAME column.
    • Click the "Eventz" button and set the "Changed" event so it triggers the MOVE_ME macro.

Download your form to the handheld (FILE | DOWNLOAD FORM) and run it. As you select different people from the dropdown, the form will move to the appropriate record.