Hi R:Base Buddies  - here's another I posted New Year's day with no
responses. Trying again!

I have a form with TWO tables.  The form is set up to place ONE row in each
table.

The form has 3 pages, page 1 has all the fields in table one, Incident;
about 2/3 of the way down the first page, you start with the fields on the
2nd table, Appraisal.  Pages 2 and 3 have the rest of the fields in
Appraisal.

The first field in both tables is a DBLookupComboBox.

The behavior I want is that each time the form comes up for a NEW row or set
of rows, I want the focus to go automatically in Incident to the drop down
box, and the choices to drop down.

I want the SAME behavior when the user presses Enter or Tab from the last
field in Incident and moves to the first field in Appraisal, another combo
box.

In order to make sure this happens ONLY the FIRST time when a set of rows
comes up, the calling program sets two variables to 0:

SET VAR eCounter = 0
SET VAR AECounter = 0

The form has an on after start EEP like this:

SET VAR eCounter = (.eCounter+1)
IF eFormMode = 'Enter' THEN
  IF eCounter = 1 THEN
    Property IncidentCompNoCombo SET_FOCUS 'True'
    Property IncidentCompNoCombo LISTOPEN 'True'
  ENDIF
ENDIF
RETURN

(Form mode tells if it's ENTER or EDIT that calls the form: BTW I'm still
using this because I can't get RBTI_FORM_MODE to work - it shows value 0
instead of 'Enter')

This works PERFECTLY - the form comes up, focus goes to the box which drops
down. The user can immediately start typing to move up/down the box or jump
to a value with Walkmenu by typing letters.  Just what my mouse-phobic users
want.  When I come back to the table during entry, it doesn't drop down.

To get the same behavior for the 2nd table, I set  up this EEP ON ENTRY TO
the combo box (I tried it as an ON ENTER ROW eep but it had no effect):

SET VAR eACounter = (.eACounter+1)
IF eFormMode = 'Enter' THEN
  IF eACounter = 1 THEN
    Property AppraisalAppNoCombo SET_FOCUS 'True'
    Property AppraisalAppNoCombo LISTOPEN 'True'
  ENDIF
ENDIF
RETURN

As you can see, it's exactly the same with name changes.

Here, the effect is ALMOST there but not quite: the box drops down, but
focus is NOT in the box. Typing letters or arrow keys has no effect.
Pressing Tab has no effect - I can't tell WHERE the cursor focus is.  ONLY
clicking on the box gets it going properly.

Field order DOES have the combo box right after the last field in the
Incident table.

What am I missing?

David Blocker
[EMAIL PROTECTED]
781-784-1919
Fax: 781-784-1860
Cell: 339-206-0261

Reply via email to