• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 745
  • Last Modified:

How do I prevent functions in my MDE from being Included in another MDB?

Nots sure if I am worrying about nothing but am I correct in assuming that if I create an MDE file with some public functions in a general module, someone else could reference their MDB to my MDE and have access to my functions? If so, how do I prevent this from happening yet still make my functions available to the VBA behind the various forms in my MDE?
0
Rob4077
Asked:
Rob4077
  • 3
  • 2
  • 2
2 Solutions
 
Bill RossCommented:
Hi,

If you're using Access 2003 or earlier you can use security to do that.  If not then you can't prevent it but you can hide your functions using strange names.  Instead of a function named CalculateMyValues(x,y) you could rename the function DogFood(x,y) or DallasTexas(x,y) for example.  Even though a user could link to your mde and expose the functions they will never figure out how to use them.

Regards,

Bill
0
 
Rob4077Author Commented:
If I use MS Access 2007 and create private copies of each function in each form that uses them, will that get around the problem?
0
 
Bill RossCommented:
Yes.  Private form functions/subs will not be exposed to the user only the form.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
I you enable a password on the VBA Project in the MDE (or MDB), then that will prevent anyone from 'seeing' Procedures in the MDE (or MDB).

lock vba project ...
0
 
Rob4077Author Commented:
Thanks mx, that sounds like a good idea. And it looks like the password removal tools may not be able to remove it from an MDE either. I just tried adding a password to my project, turned it into an MDE and tried a password removal tool on it and it won't work.

I just don't want it to be easy for someone to crack and at the same time I don't like obfuscating code like BillDenver suggested, though I recognise that it's a valid solution and will award points for it.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"And it looks like the password removal tools may not be able to remove it from an MDE either"
Ummm, well I would not guarantee that.  Most of the password hacking tools are for the *database* password (<=A2003). However, pretty sure the VBA password can be hacked, but maybe not as easily.

mx
0
 
Rob4077Author Commented:
I tried it with the tool I have, called REMOVE VBA PASSWORD, and it wouldn't do it. However maybe you're right and other tools can do it. Maybe I should just replicate all the code into each of the form modules just to be sure.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now