[AccessD] Filter Main Form with Subform...

Robert robert at servicexp.com
Wed Jun 25 06:24:13 CDT 2008


Susan,
 It really Looks like it's a requery, acts just like a requery would, and
yes if the user has selected say the 4th record down from the top, as soon
as the code hits the .Filter command the selected record moves to the top of
the subform, but the main form correctly filters to the users selected
record.

 I was hoping on some insight on another way to filter the records that
would not cause this problem?

 The bookmark issue is a bit strange, I think it fails because of the
'requerying' of the subform, but I can't really tell. I do know the work
around that I'm using now (and don't like) uses the records PK to lookup the
record (in a clone), grab the bookmark and then set it to the subform, which
works but is just way to slow.

 If I try the same exact code to grab the bookmark from the subform before
.filter fires, I get an empty bookmark, every time without exception.

WBR
 ~Robert



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Tuesday, June 24, 2008 7:48 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Filter Main Form with Subform...



> Completely unlinked. It seems whenever you apply a .filter to the main
> form, the subforms do something that looks like requerying, and the users
> record position is lost in the subform.
>
> I ran into this problem years ago when working with A2000, but in that
> design I was able to change the way the user selected the records. I 
> cannot
> do that with this design, so I really need a better solution than the one 
> I
> created...
>
> This, or any variation will cause the subform to 'requery'

========Well that's interesting -- it doesn't actually requery the records, 
it just changes the selected record in the subforms?

I wonder -- have you tried another filtering method? Is it just the method 
you're using or will any requery of the main form do this?

I don't know why you can't get a bookmark for the subforms though. I've 
never tried, but have to wonder if it's not a simple syntax problem. Are you

storing the bookmark as a Static variable?

Susan H. 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list