Access Imported form loses formatting

Joined
Jul 31, 2013
Messages
3
Reaction score
0
I have a project where I’m developing a Inhouse database and another for field use. Many of the forms and reports will be the same in both.
So I’m trying to import forms, reports, etc. from the inhouse into a blank database for the field copy. BUT when I do that my forms seem to loss all their custom formatting. Goes back to some basic theme.
What am I missing? Is there a way around this?
PS: using Access 2013
 

Attachments

  • access import or copy loses formatting.jpg
    access import or copy loses formatting.jpg
    196.2 KB · Views: 517
Joined
Jul 31, 2013
Messages
3
Reaction score
0
After fighting with this some more here is what I’ve discovered.
During a form import the Use Theme property of buttons and tab controls is reset to NO. Worse yet, the Hover and Pressed colors get reset to white.

Work around
Thanks to Jack Stockton of the LinkedIn.com Microsoft Access Gurus group for the following work around.
Rather than try to use Access’s regular Import function, use the Application object Export To Text File / Import From Text File methods.

So from your source database use the following VBA code:
Application.SaveAsText acForm, “<the Form Name>”,”<path and file name .TXT>"

Then in your destination database:
Application.LoadFromText acForm, “<the Form Name>”,”<path and file name .TXT>"

Using this idea I’ve created an Export form that lists all forms in the database, lets you select the ones you want, and export to a named path. Also created an Import form that lists the TXT files at a named path, lets you select the ones you want and import them. If anyone wants a copy, just let me know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top