FilterOnLoad/OrderByOnLoad vs. FilterOn/OrderByOn

(From the Minor Feature Series :) )

Something that you will notice in Access 2007 is that there are a couple of new properties regarding filtering: FilterOnLoad and OrderOnLoad.

But wait, don't we already have FilterOn and OrderByOn?

Well, yes, but they can be a little misleading. Depending on if they are being used for forms or reports, they have different behaviors. FilterOn/OrderByOn do show if the form/report is currently filtered, but

Now, we have a problem: in this version of Access, reports can have filtering toggled. So how do you control the boot time behavior of filtering for reports vs. triggering filtering when the report was already loaded?

The solution was to separate the boot time behavior from the triggering of the filtering after the form or report is booted.

FilterOnLoad controls solely the behavior of the filter when the form or report boots. If you set it to true, the next time the form boots the filter will be applied. If you set it to false, no filter will be applied on boot. And this works for both forms and reports. The same logic applied for OrderByOnLoad, but regarding order.

FilterOn now only controls if the filter is currently on or off, and you can turn it on or off for both forms and reports. This never affects the next boot of the form or report.

Also, I didn't mention that we took the time to expand them to other object types: tables and queries. Now, you can have a table load filtered as you wish.