John Colby
jwcolby at ColbyConsulting.com
Tue Oct 18 19:42:56 CDT 2005
ROTFLMAO. You guys are stinkers. I have NO IDEA who that handsome guy is in the picture, I just borrowed his picture to spice up my site. You know like the picture frames you buy in a store. Cute girl, you just leave her picture in there and put it on the mantle. I was going to put a cute girl on my site but my wife objected. I was going to put my wife on the site, but the cute girl objected. That guy doesn't even know his picture is up there so no objections so far. And yea, I was going to suggest Withevents but didn't want to get into it. There is lots of existing info on my site for those who can manage to move beyond the title page. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Tuesday, October 18, 2005 7:50 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Call AfterUpdate Event From Module Thanks Gustav! You may not believe this, but I only like JC a lot. After I read his writings on WithEvents, I decided I just couldn't go any further with the relationship I thought we had. Dan ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, October 18, 2005 2:15 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Call AfterUpdate Event From Module Hi Dan Not really, as you would have to pass the name of the function as a variable which you can't (well, sometimes, using Eval() but that can quickly become a mess). One method is to move all the AfterUpdate subfunctions to a single AfterUpdate sub function: Public Sub ControlAfterUpdate(ByVal strControlName As String) Select Case strControlName Case "txtDate1" Call txtDate1_AfterUpdate Case "txtDate2" Call txtDate2_AfterUpdate '... etc. End Select End Sub This sub you can call from the outside. Not fancy but it works. The fancy method is to implement WithEvents. Highly recommended. Articles on this can be found on our own site, at Shamil's site, and - if you don't fall that much in love with JC that you just can't move beyond his title page - at John Colby's site. /gustav >>> dwaters at usinternet.com 18-10-2005 00:39 >>> I need to call the field's AfterUpdate procedure (which is now Public) to perform validation, which is different for different date fields. Is there a way to do this? Thanks! Dan Waters -- 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