Bruce Bruen
bbruen at bigpond.com
Mon Jul 28 20:21:59 CDT 2003
Selina, That's pretty close.. The counter box in is a status bar panel and the continous form is a JIT subform, so I can't directly refer to it. As per charlotte's response I can now get the count properly via a sub called through the on_current event of the subform and directly update the stbar panel text. I still have a philosophical problem with using the on_current evet though as it fires after many actions have been taken not just the toolbar filter. So my problem has now become : is there a more appropriate event or other way to set the count if and only if the filter has changed through the user using the toolbar buttons? Bruce -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Selina Iddon Sent: Tuesday, 29 July 2003 10:21 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] OnFilter ecvent (repeat) Hi Bruce If it is a continuous list form, I normally have an unbound text box in the header or footer with control source as = count(recID) & " matches" when the filter runs it will automatically recalculate this control. You could also use the following if you just want the number returned so you could do more work with it. NumToReturn = dcount("*",me.recordsource,me.filter) HTH Selina ------------------------------------------------------------------------ ---- ---- Selina Iddon selina at easydatabases.com.au Ph: 0414 225 265 Easy Access Databases ----- Original Message ----- From: "Bruce Bruen" <bbruen at bigpond.com> To: <accessd at databaseadvisors.com> Sent: Tuesday, July 29, 2003 9:51 AM Subject: [AccessD] OnFilter event (repeat) > Hi List, > > Did not get an any interest in my previous post, so I'll give it > another try under a new topic. > > The onFilter event fires before the filter is applied to a form. I > need to get a record count after the filter is applied and display it. > I cannot find any way of doing this. Has anyone got any ideas? > > Tia > Bruce > > _______________________________________________ > 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