[AccessD] Selecting Filtered records in Datasheet

Rocky Smolin rockysmolin at bchacc.com
Sun Jun 5 19:57:14 CDT 2016


David:

I just made a quick datasheet form and in the ApplyFilter event put MsgBox
Me.Filter and it displayed the filtering that I selected on the form.  So
that may give you access to the filters that the user has selected.

Just save that filter in a string every time they change the filtering and
the ApplyFilter event is triggered.

Will that work?

I hope so because I'm going to get a shot of bourbon now and start dinner.
:)

r
 

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
David Emerson
Sent: Sunday, June 05, 2016 5:45 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Selecting Filtered records in Datasheet

Thanks Stuart and Rocky,

The problem is that I am not in control of the filter.  It depends on how
the user filters the records using the Access functionality.  

Currently I do what Stuart is suggesting but this sets all records in the
forms recordset, not just the ones that are left after the user has applied
their filters.

I was hoping that Access stored the filter somewhere so that I could get it
and apply it to the base records.

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Stuart McLachlan
Sent: Monday, 6 June 2016 11:46 a.m.
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Selecting Filtered records in Datasheet

Not as far as I know,  but I've done a similar thing before by just stepping
through  the filtered recordset and setting each one in turn.  I'll see if I
can dig up an example.



On 6 Jun 2016 at 11:26, David Emerson wrote:

> Hi Listers,
> 
> I have a form that is displayed in Datasheet view.  The records can be 
> filtered using the built in filtering menus.
> 
> I want to be able to identify the records that are showing so that I 
> can update a field (specifically setting a yes/no field to true).  Is 
> there a property or method that will let me know which records are 
> left when filtering is applied on a datasheet?
> 
> Regards
> 
> David Emerson
> Dalyn Software Ltd
> Wellington, New Zealand
> 
> 
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 


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


-- 
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