Gustav Brock
Gustav at cactus.dk
Wed Mar 5 11:44:48 CST 2008
Hi John I think you are right. What I have done is to make the callback function private and copy it into the module of the form - I've never had more than a couple of these for one form. But I realize that this doesn't play well with your framework. /gustav >>> jwcolby at colbyconsulting.com 05-03-2008 17:28 >>> Have you ever done this? Inside of the call back function was a static array where the data for that specific control was placed. Thus each callback was specific to the control passed in. I tried doing this and failed. Do you have code demonstrating what you are thinking about? John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Wednesday, March 05, 2008 11:12 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] using ADO to populate combos - was RE:Error3048Cannotopen any more databases That's not necessary, to write a function for each control. One of the arguments of that control is the control itself. So you could create one function, in a module, that would be your 'global' callback function. What I would recommend would be to create a class that would handle recordset objects, and in your callback function pull the appropriate recordset from that class based on the control argument that is passed to the callback function. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, March 05, 2008 9:17 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] using ADO to populate combos - was RE: Error3048Cannotopen any more databases Long ago I tried using call back functions and the only way I could figure out to do it was write a callback for each object. That just doesn't work when you want to implement this easily and automatically system wide - five hundred different combos. John W. Colby Colby Consulting www.ColbyConsulting.com