Re: Saving off forms query criteria

From: Matt B. <gtimatt_at_home.com>
Date: Sat, 21 Jul 2001 21:53:57 GMT
Message-ID: <tir4gvram8p695_at_corp.supernews.com>


"Jane Williams" <jane_at_williams.nildram.co.uk> wrote in message news:3b21ccb7.816034_at_pubnews.netcom.net.uk...
> I have no idea what Access does, but I know there's a system variable
> in Forms that stores the current query. I've used it in the past to
> hand to a Report as a parameter: the report then prints out details of
> the records selected in the form. As I recall, it's a Where clause
> (without the "Where") that gets stored.
>
> Can't remember details I'm afraid, but hopefully this gives enough of
> a hint to get you started.

It's given when the user hits ENTER-QUERY when the form is already in query mode. I'm pretty sure it's stored in a system variable too - check the online help.

However it's only the last query. If you want a historical query, you will need to find a manual way of storing it in some kind of database table by user and by form name. Perhaps query it somehow (a button maybe?), query back the old queries, let the user pick one, and assign it to the block's where clause with SET_BLOCK_PROPERTY.

Good luck,

Matt Received on Sat Jul 21 2001 - 23:53:57 CEST

Original text of this message