ClearQuery ( remove loaded query )

Top  Previous  Next

 

ClearQuery, PROTECTED

The ClearQuery method clears the listbox on the QueryVisual dialog that contains the currently loaded query.

Implementation:

The ClearQuery method is called by the Take, Restore, and QueryVisual.TakeAccepted methods. This mehtod is used by the QuickQBE functionality.

The Clear Query method does not remove the ad hoc filter from a Browse procedure. It only affects the query dialog used for managing a Browse's queries.

Example:

QueryClass.Take PROCEDURE(PopupClass P)

CODE

ASSERT(~P &= NULL)

IF SELF.QkSupport

   SELF.QkCurrentQuery = P.GetLastSelection()

   SELF.PopupList.PopupID = SELF.QkCurrentQuery

   GET(SELF.PopupList,SELF.PopupList.PopupID)

   IF Errorcode()

      SELF.ClearQuery()

   ELSE

      SELF.Restore(SELF.PopupList.QueryName)

   END

   SELF.Save('tsMRU') ! Save Most recently used for Browse\Report query sharing.

   RETURN 1

END

RETURN 0

See Also:     Save