[AccessD] AccessD Digest, Vol 84, Issue 18

Max Wanadoo max.wanadoo at gmail.com
Sat Feb 13 14:19:28 CST 2010


Ken,
That sound fantastic,....but! 
(there is always a but,isn't there)
If the "simple" solution works why do the difficult one?  The result is the
same.

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kenneth Ismert
Sent: 13 February 2010 19:18
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] AccessD Digest, Vol 84, Issue 18

>
> Shamil Salakhetdinov:
> <<<
> The rebuild was an extreme solution for
> an extreme problem, but it worked.
> >>>
> Hi Ken --
>
> Was that work code by code or manually?
>


It is a VBA code solution. The code:
 * Copies all Access objects from a source Access database to a
destination.
 * It recursively iterates the AllForms collection, creating all subform
dependencies before the parent form.
 * Uses a plug-in mechanism to handle various object creation methods,
including recreate from scratch, SaveAsText/LoadFromText, and
TransferDatabase. ImportXML and ExportXML could easily be added.
 * Has special handling for embedded ActiveX controls for which you have no
license.
 * Includes a restart function --- if the process errors out, you can
restart after the last good object that was copied

For each form, the recreate function loads the source form, and:
 * Creates a new, blank destination form
 * Creates the sections, copying all properties, including sorting/grouping
 * Orders all controls and tab page controls by tab order
 * Iterates through all controls, creating them in proper order in the
destination. Subcontrols are created under their parents
 * Iterates through the Properties collection of each control, copying them
to the destination control. This includes all hidden/outdated properties,
and properties that require custom handling.
 * Iterates through the controls in reverse z-order, sending controls to
front to so they render properly

It handles reports in a similar fashion. Modules and references are copied
by using VBA IDE methods.

It can copy/recreate about 98% of an Access database successfully. There
remains a lot of work to do on the code.

-Ken
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list