Syntax
OrdSetFocus( [cOrderName | nOrder], [cOrderBagName] ) --> cPrevOrderNameInFocusArguments
Optional order selector and bag file.
Return value
Previously focused order name.
Description
Selects an order by name or position, optionally within a specified bag, and makes it controlling for navigation and searches. The record pointer stays in the current area, while the logical order used by later operations changes. The function returns the previous order name.
Notes
The selected order must be loaded. Invalid names, positions, bags or missing areas raise an error. DbSetOrder() selects only by numeric position.
Example
PROCEDURE Main()
DbUseArea( .T., , "people.dbf", "People" )
QOut( "Previous order: " + OrdSetFocus( 1 ) )
DbCloseArea()
RETURNOutput