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 (February 2004)

Jumping Based on More Than One Value

A Jump Button will let you jump from one form to another based on a common value. For example, you can jump from PATIENTS to VISITS based on on PATIENT_ID to see all the visits for a particular patient. But what if you wanted to jump based on two fields (for example, LAST_NAME and FIRST_NAME). Here's now to do it in three east steps.

STEP 1: On your destination form (VISITS.VCE in our example), add a filter (EDIT | FITLERS | ADD). The filter will have two conditions:

FIRST_NAME = @var(0)


LAST_NAME = @var(1)

Be sure to use the @ button to select the variable. Also, make sure the "Match all" radio button is on.

STEP 2: Still on the destination form (VISITS.VCE in our example), create a macro program with two commands:

  1. Option | Filter | Predefined and select the filter you created in STEP 1.

  2. Return from macro .

STEP 3: Still on the destination form (VISITS.VCE in our example), Select EDIT | MACROS/EVENTS and press the EVENTS button. Set the ON STARTUP event to trigger the macro you created in step 2.

STEP 4: On the form you are jumping from (PATIENTS.VCE in our example), create a macro program with three steps:

  1. Assign with "Value" of FIRST_NAME and a "Col" of @var(0)

  2. Assign with "Value" of LAST_NAME and a "Col" of @var(1)

  3. Run (not Jump) and designate your destination forms (VISITS.VCE in our example) as the command