Solved

Exporting Access Forms as .frm files

Posted on 2007-12-03
7
1,464 Views
Last Modified: 2013-11-27
I do not know how to save an existing form in Access as a ".frm" file that another Access application can import wholesale.  When I right click on an existing form in the Project Explorer, the option of saving to a ".frm" file is not available to me, only ".cls".  The ".cls" file, however, will not import as a form, but as a class module.  I am, at this point, stymied.

With Excel, the process is simple and seamless.  Create a form, export to a ".frm" file, and re-import that file into another VB project: Do Access forms have the same capability?  Any support you can provide is most appreciated.
0
Comment
Question by:PeterFrb
7 Comments
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 20401188
With Access you can import & export to & from databases, but I'm not aware of any functionality to save them as a file.

With a form open you can go to File Export & export the form to another selected database.

You can also choose File> Get External Data and Import a form from another database.


Kelvin
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 20401577
As Kelvin said this functionality is not generally required because you can just import the object directly from the source mdb, or even copy and paste.
However, there are commands which save and load the form.

application.saveastext acForm,"myform","c:\folder\anyname.txt"
and
application.loadfromtext acForm,"formname", "c:\folder\anyname.txt"
0
 

Author Comment

by:PeterFrb
ID: 20413872
Thank you for your feedback, and I'm sorry that work has kept me from responding sooner.

Oddly, saveastext and loadfromtext do not seem to be part of the Access Application object.  I can run them from within Access as direct methods, but these do not show up on the list of Access Appliation methods.  As I am manipulating a code in a file external to the running Access file, I need to be able to have these methods available in order for me to be able to run them remotely,  

I think I have to change a setting somewhere in order to make these methods available to the Access application object.  Please keep at it.  Peter57r is definitely on the right track.
 
Thank you, Peter Ferber
0
 
LVL 77

Expert Comment

by:peter57r
ID: 20416056
SaveAsText and LoadFromText are 'undocumented' commands- well until fairly recently- but have been somewhat widely known for a few years.
They do not appear on Intellisense within Access but if you type the command you then get in-line help with the arguments as you type.
0
 

Expert Comment

by:fakeleft
ID: 21388221
Being able to export forms to .frm, like in Excel, would be useful for keeping track of the modules inside a VCS like Subversion.  Does anyone do this?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question