| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions > ====== LASTFIELD (return last window control) ====== | [[keystate return keyboard status .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[left return left justified string .htm|{{btn_next_n.gif|Next page}}]] | | || {{newc7.jpg|NewC7.jpg}} **LASTFIELD( )** {{blk2blue.jpg|blk2blue.jpg}} The **LASTFIELD** procedure returns the highest field number in the currently active window (or REPORT) as specified by SETTARGET. This does not include any controls in a TOOLBAR or MENUBAR. | **Return Data Type:** | SIGNED | **Example:** **DISABLE(FIRSTFIELD(),LASTFIELD())    !Dim all control fields** **See Also:** [[firstfield return first window control .htm|FIRSTFIELD]] [[prop_nextfield.htm|PROP:NextField]]