[AccessD] AXP form events for filter that returns no records

Eric Goetz EricGoetz at EGIsystems.com
Tue Mar 11 13:02:00 CST 2003


Hi,
 
It sounds like I'll be counting the records in a record set. I'm not sure when I count them in the chain of events. How can I find out when the form's recordset gets the filter applied after I assign the "FilterOn" property of the form to "True", and can I still cancel the filter then? Or, do I create my own recordset to count the number of records the filter will be returning, and if it is more than zero, I let the event propagate so the filter gets applied to the form's recordset? 
 
In a more general sense, where do I go to find out the interaction between events and the form's recordset? Should I build diagnostic code to dump the form's recordset after each event that I can find in the chain? Is there a hook in the event processing that I can use to trigger code to log each event that occurs (like a Spy program?) How can I tell when the form's recordset gets changed?
 
TIA,
 
Eric

	-----Original Message----- 
	From: William Hindman [mailto:wdhindman at bellsouth.net] 
	Sent: Mon 3/10/2003 9:34 PM 
	To: accessd at databaseadvisors.com 
	Cc: 
	Subject: Re: [AccessD] AXP form events for filter that returns no records
	
	

	...look at RecordCount in your Help file ...actual code differs depending
	upon whether you are using DAO or ADO ...HTH :)
	
	William Hindman
	"We have gone forth from our shores repeatedly over the last 100 years . . .
	and put
	wonderful young men and women at risk, many of whom have lost their lives,
	and we
	have asked for nothing except enough ground to bury them in." Colin Powell
	----- Original Message -----
	From: "Eric Goetz" <EricGoetz at EGIsystems.com>
	To: <AccessD at databaseadvisors.com>
	Sent: Monday, March 10, 2003 6:59 PM
	Subject: [AccessD] AXP form events for filter that returns no records
	
	
	> Hi,
	>
	> I'm have a form with an option group that allows the user to select from a
	set of filters. When the one of the options is selected, I use the
	AfterUpdate event of the frame containing the option to set Me.Filter to the
	appropriate string. This works great when the filter causes the forms record
	set to return more than zero records.
	>
	> When the filter causes zero records for the form, none of my controls are
	displayed. I would like to handle this possibly by cancelling the option
	button selection and displaying a dialog box that says that no records meet
	the criteria of the filter. How do I go about that? I'm thinking that I
	might need to use the BeforeUpdate event of the frame, but how do I find out
	how many records the filter will return? I'm looking through my references
	to find out when that record set gets filtered and how to cancel, but I
	could sure use some help.
	>
	> TIA,
	>
	> Eric
	> _______________________________________________
	> 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
	

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 6450 bytes
Desc: not available
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030311/75a6e5c3/attachment-0001.bin>


More information about the AccessD mailing list