[AccessD] current record of form being reset, can't find the cause

Arthur Fuller fuller.artful at gmail.com
Tue Jan 17 15:43:55 CST 2012


My thought would be to grab the PK of the current record before setting the
filter, then do a Find on that once the filter is set. This, it seems to
me, has the advantage of dealing with the possibility that the current
record is not in the filtered recordset, in which case you could go to the
first record instead.

On Tue, Jan 17, 2012 at 2:38 PM, Charlotte Foust
<charlotte.foust at gmail.com>wrote:

> When you use the filter, you're actually creating a new recordset based on
> the original but containing only the filtered records, so you can't use a
> bookmark with a filter because its scope is on the original recordset, not
> the filtered recordset.  I wonder if you could grab the filter string
> itself, as well as the record key and then cancel the ApplyFilter and use
> VBA to set the filter and the record from code?  I haven't tried it, but it
> seems reasonable.
>
> Charlotte Foust
> --
>
Arthur
Cell: 647.710.1314

Prediction is difficult, especially of the future.
  -- Niels Bohr


More information about the AccessD mailing list