The topdatawindow statement brings the topmost data window in the specified database to the front.


This statement has one parameter:

database – is the exact name of the database that is to be brought to the front. This must be a database that is currently open. If this parameter is empty ("") the topmost data window in the current database will be brought to the front, but this won’t actually do anything unless a graphics mode form or procedure window is currently in front.


This statement brings the topmost data window in the specified database to the front, on top of all other windows. The database must already be open. This example brings the Clients database to the front (but the exact window is not specified).

topdatawindow "Clients"

This example updates an inventory database. It temporarily switches to the Inventory database to do the update, then switches back to the original window when it is done. Unlike a similar example for the window statement, this example doesn’t rely on a specific window in the Inventory database being open – as long as there is one open Inventory window it will work.

local wasWindow
topdatawindow "Inventory"
if error
    message "Sorry, cannot update inventory."
find Description=grabdata("Invoice",Description)
if info("found")
window wasWindow

Note: Another way to do the same thing is to use the setactivedatabase statement.

See Also


10.0NewNew in this version.