[AccessD] Retrieve VBA Code in a form, module, class, report

Gustav Brock Gustav at cactus.dk
Wed Jul 20 13:28:05 CDT 2005


Hi Sad

You can extract the complete form to a textfile like this:

  SaveAsText acForm, "frmTest", "d:\frmTest.txt"

That will dump everything the form contains including bitmaps.
The last section begins with the line with this single word:

CodeBehindForm

The text after this will be your code.

If you edit the file, the form can be read (into an empty database) by


  LoadFromText acForm, "frmTest", "d:\frmTest.txt"

/gustav

> My Question: How can I retrieve the VBA code in a form, report,
module and/or class?




More information about the AccessD mailing list