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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

from an MDE, how can you copy a form and edit with code?

Status
Not open for further replies.

rssql

Programmer
Jul 22, 2002
87
US
i have a front end, and a back end. I wish to compile and create an mde of the front end. However, i have one form and 4 reports that i modify with code on the fly. I know that in the mde, i can't modify the objects with code but if the mde code copies and modifies the form and reports that exist in the back end, will that work? If so, how do i reference them in the back end?

Here's what i do now to the form in the front end.
docmd.copyobject , "TheNewFormName", acForm, "TheFormName"
docmd.openform , "TheNewFormName", acDesign, , , acFormReadOnly
docmd.save acForm, "TheNewFormName"

 
This won't work I am afraid.
As you know, forms in an MDE can't be edited. Also, the code in an MDE is compiled, so even if you could copy it to an mdb, which I am pretty sure you can't, you wouldn't be able to edit it any way.
Think about it, if you could do this, then what is the point of having an mde file format.

There are no eazy ways that I can think of you being able to use a form from the back end db. Maybe you could convert it into an add in, but I'm not sure how that would work.

Best of luck

Ben ----------------------------------------
Ben O'Hara
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top