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

How to hide code

Status
Not open for further replies.

TechInNeed

IS-IT--Management
Nov 14, 2002
168
CA
Hi,

I was wondering if it is possible to password protect or restrict access to the coding in access. I just want the user to only be able to have access to the front end interface.

Thanks in advance.
 
This is what the access help file says.

About MDE files
If your database contains Microsoft Visual Basic code, saving your Microsoft Access database as an MDE 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, and the size of your Access database will be reduced due to the removal of the code. Additionally, 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 using the properties or methods of the Microsoft Access or VBA Object models — 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. Any tables, queries, data access pages, or macros in an MDE file can be imported into another Access database, but no forms, reports, or modules can be imported into another Access database.
Caution Be sure to save a copy of your original Access database. If you need to modify the design of forms, reports, or modules in an Access database saved as an MDE file, you must open the original Access database, modify it, and then save it as an MDE file again. 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 a Access database as an MDE file is most appropriate for the front-end database of a front-end/back-end application.

Caution You won't be able to open, convert, or run code in a Microsoft Access 2000 MDE file in future versions of Microsoft Access. The only way to convert a Microsoft Access 2000 MDE file to a future version will be to open the original Access database the MDE file was created from, convert it, and then save the converted Access database as an MDE file.

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

If your Access database is secured with user-level security, you must meet certain criteria. Learn about using other forms of security with an Access database that is saved as an MDE file.


You must have password access to the Visual Basic code. Learn about protecting Visual Basic code.


If your database is replicated, you must first remove replication system tables and properties.


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.



David Pimental
(US, Oh)
dpimental@checkfree.com
 
Thanks a lot for the information.
It is very helpful.

 
I came across a solution that best suits my needs.
***********************************
In Visual Basic Editor (Module), Go to Tools > [myDB] Properties... > Protection. Set the password and it will locked the codes unless a correct password is provided on next time when you open it.
***********************************
 
Although the Access Help file says otherwise, you must compile your database before you create the MDE.

You also need to check your add-ins if you are using them. They may cause a problem when you try to create an MDE.

If Access cannot create an MDE, all the error message says is that the MDE cannot be created and gives no reason why.

See thread181-558485


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