Export Form to Text File

cblaine99

Registered User.
Local time
Today, 11:05
Joined
Mar 10, 2016
Messages
29
Hello,

I have two separate .mdb databases. Each contains a form named "frmMenu". I would like to compare these two forms. Specifically, I would like to compare everything about them - the controls, their properties, and the VBA code.

Ideally, I could export each form to a text file and use a standard Windows application to compare these text files.

But I can't seem to export the forms to a text file. Here's what I did:

- In the Navigation Pane, I right clicked the form module and selected Export -> Text File
- On the next screen I specified the destination file. But I noticed that the option "Export Data With Formatting and Layout" was disabled.
- I clicked OK

On the next screen I selected "Unicode UTF-8" as the encoding format.

The result was a blank text file.

I'm using Access 2007. Is it possible that the export won't work with .mdb files?

Thank you!
 
You don't export forms, you export data.
With
Docmd.transfertext
 
While I was waiting for a reply I did a Google search and found that I could export a form by going into the VBE Editor, opening the immediate window, and executing the following line.

SaveAsText acForm, "frmMenu", "C:\frmMenu.txt"

This will export the complete form definition: controls, properties, VBA code.
 
What is it about these 2 forms that you want to do this in depth comparison?
 
Good question.

The two databases were originally the same. But I decided to experiment with some enhancements to the frmMenu form in one of the databases. Then I realized I misplaced some of the notes I made along the way. Now I would like to see exactly what changes/enhancements I made, both to the controls and their properties, and to the VBA code. Mainly for documentation purposes.
 

Users who are viewing this thread

Back
Top Bottom