jwcolby
jwcolby at colbyconsulting.com
Wed Dec 12 07:41:59 CST 2007
Andy, Shamil's cExposer performs the steps outlined in my email. I have no idea where I first learned of the technique, probably from Shamil, but it is an open secret out in the dev world. And yes, Shamil's add-in should be removed from your MDE before shipping. I have never used cExposer but I will certainly see if modern versions of Access will accept it and use it. It appears to be written in A97 perhaps. Shamil, you should go back to the original and publish the MDA for all the world to see. There are advanced techniques required to get at and expose report and form modules, etc. Your already exalted status can only be increased by allowing others to learn from your experience. I was able to build a cExposer widget but it was a PITA discovering all the stuff and I no longer have (or don't know where to find) the source, and as I mentioned, I was never able to solve the "how do I save the imported class" piece. C'mon Shamil, show us your secret sauce. And folks, even though I tease Shamil about his exalted status, he is indeed the one who taught me about WithEvents and classes, the single biggest advance in my Access programming knowledge. I know that I push classes and WithEvents all the time, precisely because they are so useful, but it was Shamil pushing me that caused me to finally figure them out and use them, and it was his examples that I used to learn about it. I bow to the Northeast on a regular basis, and if my prodding has caused any of you to learn WithEvents and classes, you should too. Shamil lives in St. Petersburg Russia for anyone who does not know, which is Northeast from me. You can figure out which direction to bow from wherever in the world you live. 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 Andy Lacey Sent: Wednesday, December 12, 2007 6:24 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Classes In Referenced MDE Whoa, amazing stuff as ever from you Shamil. Not sure if my bosses (client) will let me use it though - will have to approach it gently. I've got two questions. Firstly will it work on an MDE? Secondly am I right in thinking that the Add-In would only be needed on the development machine because it does a once-and-for-all change to the referenced MDB/MDE? So once the add-in has done its work if the Fe and MDE are then copied down to a user's machine will everything run ok without the user needing the Add-In? -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Subject: Re: [AccessD] Classes In Referenced MDE Date: 12/12/07 12:14 Hello Andy, No legal way with Access 97... "not legal" but used by several developers and worked well for them - here it's: http://smsconsulting.spb.ru/shamil_s/articles/cexposer.htm Please take into account that if you use VSS then it will clear the flags which can be set by the referred above add-in.... HTH... -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey Sent: Wednesday, December 12, 2007 1:42 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Classes In Referenced MDE Hi Shamil Thanks for this. Sounds like what I need except that I can't see how to set the PublicNotCreatable property. Can you talk me through that? And before we go any further I'd better admit this is A97 in case that blows this. -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Subject: Re: [AccessD] Classes In Referenced MDE Date: 12/12/07 11:32 Hello Andy, This is a feature by design: you cannot have Creatable custom classes in a library MDB/MDE. Although you can have PublicNotCreatable custom classes (you can set this property via custom class's properties window in VBA IDE, default value is private) in your library MDB/MDE: they will be visible in FE but you can't use New keyword to create their instances in FE - the hint/"trick" is to use helper functions to create instances of these classes in library MDB/MDE.... There are also "dirty" tricks to make custom classes in MDB/MDE creatable using New keyword in FE but I'd not recommend using them and therefore I'd not write more on them here... HTH... -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey Sent: Wednesday, December 12, 2007 12:49 PM To: Dba Subject: [AccessD] Classes In Referenced MDE Hi all I've been experimenting with creating a library of standard functions in anticipation of a new project. Created MDB, imported modules with standard functions, created MDE from that and then referenced that MDE in my FE. All fine and dandy. Then imported into my library a class module. Recreated MDE. This time though my FE fails to compile because it doesn't like my Dim of a new instance of the class - unknown user-defined type. Question is am I doing something wrong or is this a limitation, ie that class modules must reside in the FE from which they're called. One of you class experts is sure to know this one. -- Andy Lacey http://www.minstersystems.co.uk ________________________________________________ Message sent using UebiMiau 2.7.2 -- 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 ________________________________________________ Message sent using UebiMiau 2.7.2 -- 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 ________________________________________________ Message sent using UebiMiau 2.7.2 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com