• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1633
  • Last Modified:

Exporting Access Forms as .frm files

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
PeterFrb
Asked:
PeterFrb
1 Solution
 
Kelvin SparksCommented:
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
 
peter57rCommented:
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
 
PeterFrbWeb development, Java scripting, Python TrainingAuthor Commented:
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
 
peter57rCommented:
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
 
fakeleftCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now