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

Can't create MDE 1

Status
Not open for further replies.

dpye

Technical User
Mar 24, 2003
31
0
0
CA
This is the first time I've run into this error and was hopeing someone can give me a hand.

The database is setup so that the data tables are stored in one database and the linked tables, forms, queries, etc. are kept in what I've called the build version of the database. I also created a workgroup for this database which requires users to sign on in order to use it. Perhaps this is where the problems is since I'm not that familar with doing this. However, the login names appear to be working fine.

Now the problem.....when I tell Access to create an MDE from the build database it thinks for a bit then says "Can't Create MDE" but doesn't say why. Any help or direction would be greatly appreciated.
 
See thread705-557883

from Access Help:

About MDE files
If your database contains Microsoft Visual Basic for Applications (VBA) code, saving your Microsoft Access database as an MDE file compiles all modules, removes all editable source code, and compacts the destination database. Your Visual Basic code will continue to run, but it cannot be viewed or edited. Saving your database as an MDE file secures you forms and reports without requiring users to log on or requiring you to create and manage the user accounts and permissions that are needed for user-level security.

Your database will continue to function normally—-you can still update data and run reports. Additionally, the size of the database will be reduced due to the removal of the code, so memory usage is optimized, which will improve performance.

Saving your Access database as an MDE file prevents the following actions:

Viewing, modifying, or creating forms, reports, or modules in Design view.
Adding, deleting, or changing references to object libraries or databases.
Changing code — an MDE file contains no source code.
Importing or exporting forms, reports, or modules. However, tables, queries, data access pages, and macros can be imported from or exported to non-MDE databases.
Considerations if you need to modify the design of forms, reports, or modules

Be sure to keep a copy of your original Access database. If you need to modify the design of forms, reports, or modules in an MDE file, you must modify the original Access database, and then resave it as an MDE file. Saving an Access database containing tables as an MDE file creates complications reconciling different versions of the data if you need to modify the design of the forms, reports, or modules later. For this reason, saving an Access database as an MDE file is most appropriate for the front-end database of a front-end/back-end application.

Code no longer secured with user-level security

In previous versions of Access, user-level security could be used with VBA modules. In Microsoft Access 2000 and later, all Visual Basic code for an Access database (.mdb) file or an Access project (.adp) file, including stand-alone modules and class modules (such as code behind forms and reports) must be secured by setting a password, or by saving the database as an MDE or ADE file, which removes the source code.

Consideration before saving your database as an MDE file

Some restrictions may prevent you from saving your Access database as an MDE file:

You must have password access to the Visual Basic code.
If your database is replicated, you must first remove replication.
If your Access database references another Access database, or add-in, you must save all Access databases or add-ins in the chain of references as MDE files.
Additionally, if you define a database password or user-level security before saving an Access database as an MDE file, those features will still apply to an MDE file created from that database. If your Access database has a database password or user-level security defined and you want to remove these features, you must do so before saving it as an MDE file.

To save an Access database that was secured with user-level security as an MDE file, you must meet the following requirements before you can proceed:

You must join the workgroup information file that defines the user accounts used to access the database, or that were in use when the database was created.
Your user account must have Open/Run and Open Exclusive permissions for the database.
Your user account must have Modify Design or Administer permissions for any tables in the database, or you must be the owner of any tables in the database.
Your user account must have Read Design permissions for all objects in the database.
About references and MDE files

If you try to create an MDE file from a Microsoft Access database (.mdb) or an add-in (.mda) that references another Access database or add-in, Access displays an error message and doesn't let you complete the operation. To save a database that references another database as an MDE file, you must save all databases in the chain of references as MDE files, starting from the first database referenced. After saving the first database as an MDE file, you must then update the reference in the next database to point to the new MDE file before saving it as an MDE file, and so on.

For example, if Database1.mdb references Database2.mdb, which references Database3.mda, you would proceed as follows:

Save Database3.mda as Database3.mde.
Open Database 2.mdb and change its reference to point to the new Database3.mde.
Save Database2.mdb as Database2.mde.
Open Database1.mdb and change its reference to point to the new Database2.mde.
Save Database1.mdb as Database1.mde.
About saving a replicated database as an MDE file



Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
To simplify the answer: Go to code builder of any form you have. Click on Debug and Choose compile. This will check your code and stop at any errors you have on any one of your forms or modules. Fix the error and then you will be able to make an mde.


:)WB
 
Thanks,

This is excatly what I did and was able to creat the file. I initially thought the compile was done during the creation so I overlooked that.
 
Glad that worked. Microsoft's help ïs not quite accurate where it says:

"If your database contains Microsoft Visual Basic for Applications (VBA) code, saving your Microsoft Access database as an MDE file compiles all modules, removes all editable source code, and compacts the destination database.

Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top