Navigation: ABC Library Reference > QueryFormClass > QueryFormClass Methods >====== Ask (solicit query criteria) ====== | |
Ask( [ uselast ] ), VIRTUAL, PROC
Ask | Accepts query criteria (search values) from the end user. |
uselast | An integer constant, variable, EQUATE, or expression that determines whether the QueryFormClass object carries forward previous query criteria. A value of one (1 or True) carries forward input from the previous query; a value of zero (0 or False) discards previous input. |
The Ask method displays a query dialog, processes its events, and returns a value indicating whether to apply the query or abandon it. A return value of Level:Notify indicates the QueryFormClass object should apply the query criteria; a return value of Level:Benign indicates the end user cancelled the query input dialog and the QueryFormClass object should not apply the query criteria.
Implementation:
The Ask method declares a generic (empty) dialog to accept query criteria. The Ask method calls the QueryFormClass object's WindowManager to define the dialog and process it's events.
The GetFilter method generates filter expressions using the search values set by the Ask method.
The Init method sets the value of the QueryFormClass object's WindowManager.
Return Data Type: BYTE
Example:
MyBrowseClass.TakeLocate PROCEDURE
CurSort USHORT,AUTO
I USHORT,AUTO
CODE
IF ~SELF.Query&=NULL AND SELF.Query.Ask()
CurSort = POINTER(SELF.Sort)
LOOP I = 1 TO RECORDS(SELF.Sort)
PARENT.SetSort(I)
SELF.SetFilter(SELF.Query.GetFilter(),'9 - QBE')
END
PARENT.SetSort(CurSort)
SELF.ResetSort(1)
END
See Also: GetFilter, Init, QueryFormVisual