OpenQuery Method
The OpenQuery method opens the QueryObject and retrieves its results.
This method has the following syntax:
integer = Query_Control.OpenQuery(querymode = integer,
queryscope = scope, checkcols = integer
[,isrepeated = integer][,maxrows = integer])
The arguments to OpenQuery are the same as those of the DataStream's Open method. In most cases, you should set querymode = QY_CACHE, queryscope = CurFrame.Scope, and checkcols = TRUE. The other two arguments can be omitted unless you want to specify a maximum number of rows that can be retrieved.