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 (October 2008)

Opening a Form in List View

Usually, when a form is opened, it opens up in single record view. If you want, the form can be opened in list view instead.

If a form was in list view when it was last closed, it will come up in list view when form is restarted. If a form was in single record view when it was last closed, it will come up in single record view when form is restarted.

If you always want the form to open in list view (regardless of what view it was in when it was last closed), you can have your form run a macro when the form first starts. This macro will determine if the form is in list view and, if not, the macro can turn on list view. The scalar function @listview can be used to determine if you are in list view or not.

Open your form in the form designer. Select EDIT | MACROS/EVENTS and create a new macro called "MyStartup". The macro will have the following steps:

    Step 1: SKIP if @listview then 1 else 0
    Step 2: OPTION | LIST
    Step 3: Return from macro

While the macro is still being displayed, click the EVENTS button. In the "On Startup" dropdown, select "MyStartup". Click OK and then CLOSE.

That's it. When the form is started on the handheld, it will always be in list view.


Previous Tips of the Month