Solved

Exporting Access Forms as .frm files

Posted on 2007-12-03
7
1,441 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now