Re: Unable to filter records using a command button

From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 07/22/04


Date: Thu, 22 Jul 2004 16:55:52 +1200

Tommy,

Do you have the your 1126 records displayed in a subform, or is it a
continuous view form which is not a subform on another form?

-- 
Steve Schapel, Microsoft Access MVP
Tommy Keenze wrote:
> I have an MS Access 2003 database with 1,126 records of members in an
> organization. The records contain a field named strStatus in which
> some members are identified as “Active” and some as “Deceased”, etc.
> There are 276 “Active” records.
> 
> I created a command button on the form that executes a macro. The
> macro command is “ApplyFilter”, and the Filter Name control contains
> the name of the underlying query: qselActiveMembers. The query
> produces correct results when executed directly, and the command
> button executes the macro. However, the database still shows all
> 1,126 records.
> 
> Similarly, I created a button to limit records to those with a
> checked option box. The underlying query for this macro works
> perfectly also, but not when executed thru the command button on the
> form.
> 
> I would be grateful for any suggestions to solve this rather
> perplexing problem.
>