?
Solved

Exporting Access Forms as .frm files

Posted on 2007-12-03
7
Medium Priority
?
1,510 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

650 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