And I wrote it because I could use my own icons on a bit button.

The nested IFs below could be distilled into a CASE statement for simplicity, especially if the number of tables is greater.

Nice code, Emmitt!   I know we all didn't like it that buttons
had to be tied to tables, but there were a few instances
where it came in handy, and this was one of them!  Your
code is a nice alternative to using a DB navigator when
you want these buttons to apply to only one table!

Karen




Marc,

Create one button with an eep that does:

        NEXTROW
        RETURN

Now, create another button that does:

        NEXTROW
        NEXTROW
        NEXTROW
        NEXTROW
        NEXTROW
        NEXTROW
        NEXTROW
        RETURN

The only trick here in a multiple-table form is making sure the table you
want to act upon has focus when the button is clicked.  The way I do this
with a three-table form, where I want to go to the first row, is:

  SET VAR vtabname = .RBTI_FORM_TBLNAME
  IF vtabname = 'invallw' THEN
    PROPERTY TABLE invallw 'FIRST'
  ELSE
    NEXTTAB
    SET VAR vtabname = .RBTI_FORM_TBLNAME
    IF vtabname = 'invallw' THEN
      PROPERTY TABLE invallw 'FIRST'
    ELSE
      NEXTTAB
      PROPERTY TABLE invallw 'FIRST'
    ENDIF
  ENDIF

Basically I'm just checking what the current table is before issuing the
command, and if it isn't what I want, I do a NEXTTAB and check again.

Emmitt Dove
Manager, DairyPak Business Systems
Blue Ridge Paper Products, Inc.
40 Lindeman Drive
Trumbull, CT  06611
(203) 673-2231
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to