473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Import all the forms


Is there any way to give a command to import all the forms from a
database?

I couldnt doi it. I tried to import all the forms from a database into
my database where i have only one form. This form is called Form1, and
on its control on the OnClick event i have the following line:
ImportAllForms( "C:\BE\temp.mdb")

and the function is :

Private Function ImportAllForms(strDbName As String)
Dim appAccess As Access.Application
Dim frm As AccessObject
Set appAccess = New Access.Application
appAccess.OpenCurrentDatabase strDbName, False
'loop
For Each frm In appAccess.CurrentProject.AllForms
DoCmd.TransferDatabase acImport, "Microsoft Access", strDbName, acForm,
frm.Name, frm.Name
Next frm
appAccess.CloseCurrentDatabase
Set appAccess = Nothing
End Function


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
0 4035

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andrew James | last post by:
All, I'm having some trouble with understanding python's importing behaviour in my application. I'm using psyco to optimise part of my code, but I'm not sure whether it inherits throughout the...
2
by: TomB | last post by:
Ok, I'm new to dotnet. Not only do I need help I need to know which of the dotnet groups would be best for this question. I have over 30 applications in Access with nearly 300 forms that have to...
4
by: Steve Jorgensen | last post by:
I'm restarting this thread with a different focus. The project I'm working on now id coming along and will be made to work, and it's too late to start over with a new strategy. Still, I'm not...
13
by: (Pete Cresswell) | last post by:
Something's going on locally with my Access 2000. Whenever I import an object from another .MDB, it damages the receiving DB to the point where I have to rebuild from the last backup. ...
1
by: enrio | last post by:
I have made a number of changes to the code of an access 2000 application, and now the person responsible for the application wants to import one change at a time into his "master copy", after he...
4
by: Bruce W. Roeser | last post by:
All, I'm reading a book by Charles Petzold (Programming VS.Net). Pretty good content but am confused about the difference. From the text: ...
3
by: Sender | last post by:
Hello all: I have two forms in the project: form1, form2. form1 reads a file. form2 write data to that file. On form1 outside any class I am writing: Import system.io Right now I have also...
1
by: baling | last post by:
Hi.... Hi everybody, i have a code that i make in VBA and know I want to use this code in to VB6. But i don't know how to use that code in to VB 6.0 Please correct this code so i can use it in VB...
8
by: =?Utf-8?B?Ym9iYnk=?= | last post by:
Could you please help me in this project. I have aTab delemeted file. It has 20 columns and some data. I have to import this data into SQL Server. I am using sql express edition. I am using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.