Microsoft Most Valued Professional MVP - Access Expert

mvp.png

  Boyd Trimmell, aka HiTech Coach
  Microsoft MVP - Access Expert


What is a Microsoft  Most Valuable Professional (MVP)?
Microsoft  awards the Most Valuable Professional (MVP) in recognition of significant contributions made to technical communities by sharing high quality, real world expertise. Microsoft Most Valuable Professionals (MVPs) are a worldwide network of exceptional technical community leaders.

"If technology doesn't work for people, then it doesn't work."
- Kim Vicente

Backing up and Restoring Objects

There is an un-documented hidden method that VSS uses to export the objects through VBA. It's very simple to use. It  doesn't require any special references to be set.

Here is an example for a form object:

CODE TO SAVE

Application.SaveAsText acForm, "Customers", "C:\backups\forms\Customers.txt"

To load a form back in to access from a text file:

CODE TO LOAD

Application.LoadFromText acForm, "Customers", "C:\backups\forms\Customers.txt"


*** Warning *** When you use the  .LoadFromText to import an object it will overwrite an object with the same name without  warning.

TIP 1: I use this to repair a form or report that has become corrupted. You can open the text file in Notpad and edit it. I do this to fix report that has the printer object data corrupted. If this does not repair the object then you will need to restore the object from a backup or recreate it.
TIP 2: You can use this to make backups fo all your objects into a folder.
TIP 3: This can be used to create your own version control.