VBA and Report Security

G

Guest

I work as a consultant that writes reports in access for an accounting
program based on access. I already know how to secure the VBA Code behind my
reports but would like a way to prevent my report from running if the report
database is copied by another consultant and my report is imported into
another database. Could I add a line of code into my reports that would
confirm something like: IF Filename = Smith.mbd Then Continue Else Stop?

This way if someone copied my report into another report databse for a
different Client the report would not run.
 
R

Rick Brandt

AccountingLabs said:
I work as a consultant that writes reports in access for an accounting
program based on access. I already know how to secure the VBA Code
behind my reports but would like a way to prevent my report from
running if the report database is copied by another consultant and my
report is imported into another database. Could I add a line of code
into my reports that would confirm something like: IF Filename =
Smith.mbd Then Continue Else Stop?

This way if someone copied my report into another report databse for a
different Client the report would not run.

Your report would not do anything in another database unless that database had
the same tables and/or queries that your report uses.
 
G

Guest

As I stated in first half of my message the report database runs off an
accounting program that is access based -- therefore, if someone imports my
reports from my report database they can sell those reports as their own to
other users of the same accounting program. I want specific reports to fail
to run if they are not installed in a report database with a specific name.
 
J

Joerg Ackermann

Hi,
I work as a consultant that writes reports in access for an accounting
program based on access. I already know how to secure the VBA Code
behind my reports but would like a way to prevent my report from
running if the report database is copied by another consultant and my
report is imported into another database. Could I add a line of code
into my reports that would confirm something like: IF Filename =
Smith.mbd Then Continue Else Stop?

This way if someone copied my report into another report databse for a
different Client the report would not run.

Try:

If Dir(CodeDb.Name) = "Smith.mbd" Then
...


Acki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top