Jim Lawrence (AccessD)
accessd at shaw.ca
Sun Dec 21 01:33:05 CST 2003
Hi Susan: The program just demonstrated that virtually anything can be done in the Open event. If you decide to add a form, call it like a class, John C has a few examples, and add the functionality to the form that will apply the appropriate filter. Unfortunately, I do not have an exact example but could assemble one fairly quickly. I have faith in you Susan...but if just are completely stuck, send me an email and I will parley something together. HTH Jim PS Just came back from a whole family event where we all went to see the 'Return of the kings'...great event...everyone loved it. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Harkins Sent: Saturday, December 20, 2003 7:30 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Report's On Open Your Open event procedure assumes the filtering form is already opened and criteria options selected. If it isn't, you make a default selection. I'm talking about an Open event procedure that actually opens the form so the user can make choices. I'm questioning whether you could (or even should) make choices after the report is opened. Susan H. > Hi Susan: > > Check out the coding examples at the DBA site... You remember the one I > wrote and the one you reviewed. <a devilish grin> > http://www.databaseadvisors.com/newletters/newsletter112003/0311UnboundRepor > ts.htm To summaries, the code sample makes good use of the Report's On Open > event by call a process that actually acquires the Report's data before > displaying it. As you can see the process to filtering the data, or doing > anything with the data you want is straight forward. Just about anything can > be added to the Report's On open event, even a form that would do the > filtering. > > HTH > Jim > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Harkins > Sent: Saturday, December 20, 2003 2:32 PM > To: AccessD at databaseadvisors.com > Subject: [AccessD] Report's On Open > > > I read about a technique in a fairly new Access 2002 book that you could use > a report's On Open event to filter the data. The section didn't give > details, it just referred to displaying a "dialog" in the On Open event. > Now, I know you can pass criteria via the OpenArgs property, but the author > doesn't seem to be talking about this. In fact, the process seems turned > around -- the report displaysing the filtering form, not the other way > around. > > Does anyone actually use the report's On Open event to somehow grab > filtering data? I'd like to hear about it if you do. Keep in mind, I'm not > talking about displaying a filtering form and then passing the criteria via > an OpenReport -- I'm talking about opening a report from the Database window > and letting the report's On Open event display a filtering form. I don't see > how this would be possible -- how would you stop the report from populating > while the Open event displayed a form and the user selected options? > > Susan H. > > _______________________________________________ > 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