Password protect VBA code

Bee

Registered User.
Local time
Today, 19:03
Joined
Aug 1, 2006
Messages
487
Hi,

Is the password property in Access secure enough to protect VBA code?

Regards,
B
 
Nothing is totally secure but Access 2003 security is much stronger than previous versions. Convert the MDB into a MDE if you want more protection for your code.
 
ghudson said:
Nothing is totally secure but Access 2003 security is much stronger than previous versions. Convert the MDB into a MDE if you want more protection for your code.
What's the difference between the two? Will my database continue to work in exactly the same way if I convert?

Regards,
B
 
Yes, it will. Just be sure to keep the MDB version as your master copy. Make updates to it, create a new MDE and push it out.

One thing you will miss is the ability to do code breaks on errors, but then you should be able to replicate issue on your master copy and debug it there.
 
pdx_man said:
Yes, it will. Just be sure to keep the MDB version as your master copy. Make updates to it, create a new MDE and push it out.

One thing you will miss is the ability to do code breaks on errors, but then you should be able to replicate issue on your master copy and debug it there.
Does the MDE work as an exe copy even if not exactly in the same way?
 
No the MDE is not an EXE file. Users still need to have MS Access installed. What an MDE does is restrict design access to forms, macros and modules.
 
Fear Naught said:
No the MDE is not an EXE file. Users still need to have MS Access installed. What an MDE does is restrict design access to forms, macros and modules.
Alright. Thanks,
B
 
I may be wrong about this but an mde won't save any formatting changes you do - specifically in a datasheet view - but an mdb will.
 
Just make sure you split the DB, create MDE from Front-End (FE) and keep the Back-End (BE) as an MDB.

Hoope this helps?
 
The REAL question is to define what you mean when you say "protect VBA code." As in - no readers? or just no modifiers?

If no modifiers, Workgroup protection is strong enough to allow that. Just don't grant WRITE or UPDATE or DELETE access to the modules and forms.

If no readers, you must use the MDE method suggested above.
 
jkl0 said:
Just make sure you split the DB, create MDE from Front-End (FE) and keep the Back-End (BE) as an MDB.

Hoope this helps?
Thanks, that sounds great.
 
The_Doc_Man said:
The REAL question is to define what you mean when you say "protect VBA code." As in - no readers? or just no modifiers?

If no modifiers, Workgroup protection is strong enough to allow that. Just don't grant WRITE or UPDATE or DELETE access to the modules and forms.

If no readers, you must use the MDE method suggested above.
I would actually like to go for the second one in this situation which is "No readers".

Thank you.
B
 
pdx_man said:
Yes, it will. Just be sure to keep the MDB version as your master copy. Make updates to it, create a new MDE and push it out.

One thing you will miss is the ability to do code breaks on errors, but then you should be able to replicate issue on your master copy and debug it there.
Do you mean I will lose the ability to debug only on the MDE version not the MDB?
 
This may be a stupid question, but I have been looking for an answer to it with no success so far.

I went to Access Help files and search on how to convert an .MDB to MDE. It returned a lot of options and most of them talked about troubleshouting, relicating a database. I just could not find a step by step guide at all.

Please help.
B
 
Its as simple as going to tools/database utilities/make mde file.

You may need to correct any compile errors etc beforehand!

Backup the mdb before , after and always.
 
Lock Project for viewing

Probably not what you meant, but it's possible to lock your VBA code so that it can't be opened and read without a password.

Here's how I did it (there's probably a better way) -
In the VB project window, right click and choose properties
Choose the Protection tab.
Check the box and enter a password

Too simple to be the right answer, but it works fabulously for me!
 
Bee said:
Do you mean I will lose the ability to debug only on the MDE version not the MDB?

You can only debug in the MDB version, since the code will be in its compiled form in the MDE, hence, you can't view the code.

If you have an error, you will need to replicate the error in the MDB version to be able to get to debug mode.
 
Don't I have to set up a password for the MDE or doesn't it need it? Also, when I wanted to create MDE, access prompted me to convert database to 2003 Version, I converted the front end. Is It recommended to convert the BE as well, or should I leave it as Version 2002?

Thanks,
B
 
You can leave the BE in 2002, but it may be easier to maintain going forward if both are in the same version. Setting a password for the MDE is optional and can be done in the MDB or the MDE.
 
pdx_man said:
You can leave the BE in 2002, but it may be easier to maintain going forward if both are in the same version. Setting a password for the MDE is optional and can be done in the MDB or the MDE.
That sounds great. Thank you.
 

Users who are viewing this thread

Back
Top Bottom