Dan Waters
dwaters at usinternet.com
Thu Sep 6 12:56:38 CDT 2007
This changes the screen display characteristics. Enable/disable, lock/unlock, and label colors depending on a user's authorities, the state of the process, and data content. This is the only thing I use the Current event for, and I know all the reasons the current event gets triggered, so I can manage this effectively. Putting this into a separate sub would work fine, this is just what I've evolved into doing. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Thursday, September 06, 2007 12:23 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SubForm and form Then it would still be easier to manage elsewhere than in current. What is it the code does that you want to manage? Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Thursday, September 06, 2007 9:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SubForm and form I do use a flag to allow it to run or not run. Gotta manage it! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Thursday, September 06, 2007 10:09 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SubForm and form The current event is a bad place for that kind of code unless you use flags to keep it from running repeatedly. You'd be better off putting the code in a separate routine and calling it when appropriate based on module level flags. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Wednesday, September 05, 2007 6:00 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SubForm and form Hi Charlotte, My current events tend to be quite long because they manage the screen display in many ways. No point in running it twice before the user can even see the screen! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Wednesday, September 05, 2007 6:22 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SubForm and form Sorry, Dan, but it sounds like you're trying to do something may not need to be done ... Or at least not as you're doing it. WHY are you trying to manage the subform's Current event. It's called by Load, but it fires much more frequently than that. Maybe you're trying to solve the wrong problem. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Wednesday, September 05, 2007 4:07 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SubForm and form Hi Shamil, What I've used in the past is a public Modular Boolean variable set in the main form's module. It's default value is false, of course. When the subform's load and open events are running before the main form is opened, the parent's Boolean variable is false, and the code is written to exit out of the subform load and/or open events. Only when that variable is explicitly set to True will the code not exit out. It can be set to true in either the parent form or the subform. What I'm actually managing is the subform's Current event, which is called by the Load event. I was just looking for an alternative. Thanks! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Wednesday, September 05, 2007 11:35 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SubForm and form <<< I sure would like to manage a subform's load and open events. >>> Dan, That needs tricky programming if possible at all to manage these events using WithEvents because subform's Load and Open events fire *before* form's Load and Open events... IOW you'll need to use Me.Parent.SomeCallbackName callback procs from subform's module to "inform" parent form about subform's Load and Open events... -- Shamil -- 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 -- 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 -- 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