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 (September 2010)

Reversing the Record Order (from the handheld)

Note: This tip talks about how to reverse the record order when you are working on the handheld. For instructions on how to do this while working on the desktop with your handheld attached, see the July 2008 tip.

Most of the time, when you want to see your records ordered by a column, you want numbers and text to be sorted in ascending order and dates to be descending. But sometimes you want the records sorted in the opposite direction.

In order to present the records in sorted order, Visual CE uses an index you previously created. The records are displayed in the order of this index. By default, when you create an index, numbers and text are sorted in ascending order and dates descending. But it does not have to be this way, you can create this index in the opposite order.

To do this:

  1. Open a form over the table
  2. Select OPTION | LIST. Indexed columns have a ^ or ^^ by their name. If the column does not have a ^ or ^^ by its name, then there is no index over that column. If the column does have a ^ or ^^ by its name, then there is an index over that column.
  3. If the column is already indexed, you first need to remove the index over that column:
    1. Create an index on some other column by clicking on the name of some other unindexed column. You may or may not be asked "Which index are you willing to replace?"
    2. If you don't see this message, keep creating indexes (by clicking on the name of some other unindexed column) until you do.
    3. When you finally see the "Which index are you willing to replace?" message, click on the name of the column you want in reverse order...but don't click on OK yet.
    4. Bring up the soft keyboard
    5. Click on the SHIFT key to activate it
    6. While the SHIFT key is still depressed, click OK
    7. Click on the SHIFT key again to de-activate it. The column will no longer be indexed.
  4. Create the new index. To do this, first bring up the soft keyboard
  5. Click on the SHIFT key to activate it
  6. Click on the name of the column you want in reverse order
  7. You will see a message saying "You are limited to 4 sort orders...". It may or may not ask you "Which index are you willing to replace?".
    • If it asks you which index you are willing to replace, select a column and click OK (while the SHIFT key is still depressed).
    • Otherwise click YES (while the SHIFT key is still depressed).
  8. Click on the SHIFT key again to de-activate it
The index will be created in the opposite order.


Previous Tips of the Month