Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undocumented Filter?

Status
Not open for further replies.

rubbernilly

Programmer
Sep 20, 2005
447
US
Crosstab queries (perhaps among other sorts of queries), do not have a Filter property.

But create a form with a subform control, and put in the SourceObject Property of the sf-control "Query.MyCTQuery" and you can do a filter-by-form or a filter-on-selection.

But, when you have done that, test the various places you might find the query's filter:

Me.Filter
...will be empty

Me.SubformControl.Form.Filter
...will give you an error

set qd = currentdb.querydefs("MyCTQuery")
qd.Properties("Filter")
...will give you an error that the property does not exist


Is there someplace else where this Filter is being stored, someplace that we can get at it?
 
Perhaps the Filter property of the underlaying DAO.Recordset object ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So with the main form open ("Main"), and a crosstab query displaying as the sourceobject of the subform control ("DynamicSub", sourceobject="Query.MyCTQuery"), how do I get at the underlaying DAO.Recordset object?

Are you talking about the recordset object of the subform?

me.DynamicSub.Form.Recordset.Filter
 
I just tested that, and it is empty. The property is there (I don't get an error referencing it), but it is empty.

Any other ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top