Does Microsoft Access 2024 (Professional Plus 2024) Export Forms as Text for Re-Import? (2 Viewers)

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 07:27
Joined
Jul 9, 2003
Messages
17,274
Hi everyone, I'm GroK and I rewrite Uncle Gizmos text into human readable format... UG is upgrading to Office Professional Plus 2024, which includes Microsoft Access 2024. UG has a question about form exporting:-

I’d like to export a form—its objects like command buttons, combo boxes, and properties (e.g., Left, Top)—as a text file, modify that text, and reimport it to recreate the form in the database. Basically, I want to edit forms externally and bring them back as fully working forms.

This is possible in older versions with Save As > Save Object As > Text File? (I think) but I’m not sure if it’s an official feature or more of an undocumented quirk. Grok thinks Access 2024 (which builds on prior versions with some enhancements) only exports data or basic metadata this way, not a full control layout, and suggests VBA as the alternative. --- Any Idea?

And has anyone had experience with Access 2024? Tips on this would be most welcome....
 
@Uncle Gizmo, The undocumented Text-related methods I am aware of are not found going through the menu. Is that what we're talking about here?
 
The undocumented SaveAsText / LoadFromText still work in the latest versions of Access (365/2024)
Open the Immediate window (Ctrl+G)
Type:
Application.SaveAsText
and a <space>, and follow intellisense prompt.

Similar for Application.LoadFromText.
 
@Uncle Gizmo, The undocumented Text-related methods I am aware of are not found going through the menu. Is that what we're talking about here?

I'm not 100% sure theDBguy, and I'm too lazy to fire up MS Access and check !!!
 
I'm not 100% sure theDBguy, and I'm too lazy to fire up MS Access and check !!!
That's okay. Both methods mentioned by Colin and Tom are not found in the menus, so at least you're aware of that now. I am currently on my phone, so I can't also check what save or export to text may be available from using the menu system.
 
The undocumented SaveAsText / LoadFromText still work in the latest versions of Access (365/2024)

Thanks Colin! Grok didn't seem to think it had carried over into the 2024 version ... So I told him I was going to check on the forum!!
 
The undocumented SaveAsText / LoadFromText still work in the latest versions of Access (365/2024)

Update!

It appears that the large language models do not take into account undocumented stuff, might be worth noting... You may have to ask them explicitly to research undocumented features if you want to Deep dive through the agency of an LLM....
 
Hi,
I include export to text code in most of my apps as a way to create backups. I discovered long ago, when a database corrupted that the backups were usually useless also. So, I create two kinds of backups for my FE's. One makes a full file copy and the other exports all objects as separate files to a dated folder. There is also an import function that I use if I have to rebuild the app from the backup. I'll show it to you Wednesday if you are interested.

If you want to run the export separately, there is a form that lets you choose which specific objects (frmMain) or object types (all forms for example)
 
I'll show it to you Wednesday if you are interested.
Hi Pat, Thanks for sharing that export-to-text backup trick, Love to see your import function too. looking forward to Wednesday’s demo. Time’s back to normal, so I’ll be there. Cheers!
 
With regard to "undocumented": the procedures are (of course) in the type library, and the Object Browser (F2) will reveal them if you turn on the "Show Hidden Members" option.

1743554452425.png
 
I use Version Control addin by joyfullservice. I think @Josef P. has a part in the project too.


It's a very nice addin that adds a tab to the FE and can be used to export/import all/selected objects as text files to a folder.

2025-04-02_09-33-17.jpg


2025-04-02_09-36-34.jpg
 
Last edited:
I’d like to export a form—its objects like command buttons, combo boxes, and properties (e.g., Left, Top)—as a text file, modify that text, and reimport it to recreate the form in the database. Basically, I want to edit forms externally and bring them back as fully working forms.
Exporting or importing may be the least of the problems. Depending on the project, modifying a form or its controls in the text file can be a challenge. ;)
Example:
Code:
Version =20
VersionRequired =20
Begin Form
      ...
     Begin Section
            Height =5442
            Name ="Detail"
            Begin
                Begin TextBox
                    OverlapFlags =85
                    IMESentenceMode =3
                    Width =0
                    Height =0
                    Name ="sysFirst"
                End
                Begin TextBox
                    OverlapFlags =85
                    TextAlign =1
                    IMESentenceMode =3
                    Left =2310
                    Top =90
                    Width =9075
                    Height =405
                    TabIndex =1
                    Name ="txtTestClassNameFormat"
                    GroupTable =2
                    BottomPadding =150
                    HorizontalAnchor =2
                    ShowDatePicker =0
                    LayoutCachedLeft =2310
                    LayoutCachedTop =90
                    LayoutCachedWidth =11385
                    LayoutCachedHeight =495
                    ColumnStart =1
                    ColumnEnd =1
                    ...
                   Begin
                        Begin Label
                            OverlapFlags =85
                            TextAlign =1
                            Left =120
                            Top =90
                            Width =2161
                            Height =405
                            Name ="Label124"
                            Caption ="TestClassNameFormat:"
                            GroupTable =2
                            RightPadding =0
                            BottomPadding =150
                            LayoutCachedLeft =120
                            LayoutCachedTop =90
                            LayoutCachedWidth =2281
                            LayoutCachedHeight =495
                            LayoutGroup =1
                            GridlineThemeColorIndex =1
                            GridlineShade =65.0
                            GroupTable =2
                        End
                    End
...


[OT: msaccess-vcs]
I use Version Control addin by joyfullservice. I think @Josef P. has a part in the project too.
But only a very, very, very small part ;)

We would like to thank the following 3 people for the well-functioning add-in:
Adam (joyfullservice): 1232 commits, ~180k changes
hecon5: 242 commits, ~6k changes
bclothier: 52 commits, ~4k changes
 
Last edited:
@Uncle Gizmo Appologies for going off topic

But only a very, very, very small part ;)
@Josef P. Based on the name of addin (Version Control), I expected it to create seperarte backups on each run, to have a history of changes.
something like:
Code:
MyDatabase
     |
     |____ MyDatabase_20250311_101510
     |____ MyDatabase_20250401_112010
     |____ MyDatabase_20250501_081230
     ........
But unfortunately each time the previous version gets over written and to prevent this, I have to create the folder structure manually.
Is there any consideration to have a feature like this in future versions?

Thanks.
 
Last edited:
[OT]
Maybe this will be a longer discussion, so I opened a new thread. :)
 

Users who are viewing this thread

Back
Top Bottom