Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy a form and relating code to another database 1

Status
Not open for further replies.

rjmdt

Programmer
May 17, 2002
38
US
I have a current database that I want to copy some forms and macros into from a developmental database. What is the best method? I have tried exporting the forms and the macros, but when I try and open in the current database the form won't open. Also I cannot just overwrite the current database because some of the other forms in the current database have already been modified.

Thanks in advance
 
Can you open the imported forms in design view?
 
For the form to actually open, assuming it's a bound form, the underlying RecordSource would have to be in the db you've imported it into. As Remou suggested, you should be able to open it in Design View.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Yes I can open the form in design view, but when I try open the event that runs when the form opens I receive a network error. I started this developmental database from a copy of the current, so all the underlying recordsets are present. I kept track of all form changes and double checked by looking at the modifed dates of all the forms, queries, macros and modules.
 
In generic terms it says it cannot find the file. I'm not sure what file it is looking for.
 
No error number? What happens if you change the record source?
 
Error exactly:
The expression on open you entered as event property setting produced the following error: Error accessing file. Network connection may have been lost
*The expression may not result in the name of the macro, the names of the user-defined function or [Event Procedure].
*There may have been an error evaluating the function, event or macro.

So when I open in design mode and look at the properties of on open there is a [Event Procedure]. I try and open and it gives me another error.
Microsoft Visual Basic.
Error accessing file. Network connection may have been lost.
I click ok and it opens but does not display the Microsoft Access Class Objects for my form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top