Is there a way to protect an access app from copying or restricting its
use?
If it is a software solution then its better as the app can then be
emailed
to a prospective client instead of having to physically send hardware keys
as well.
I create a custom property in the database to store the install date,
then check against this property when you opening the database.
__________________________________________________
NOTE: This function will only run once without crashing (property
already exists) so include error handling to trap the error (3311).
Function SetInstallDate()
On Err GoTo Err_Handler
Dim db As DAO.Database
Dim prp As Property
Dim dtmInstall As Date
'set installation date
dtmInstall = Date
Set db = CurrentDb
'define new property
Set prp = db.CreateProperty("Install Date", dbDate, dtmInstall)
'append new property to collection
db.Properties.Append prp
Exit_Here:
Set prp = Nothing
Set db = Nothing
Exit Function
Err_Handler:
Select Case Err
Case 3311
Resume Exit_Here
Case Else
MsgBox Err.Number
Resume Exit_Here
End Select
End Function
_________________________________________________
Use this function to check the system date against the property to
determine whether to kick them out.
Function IsLegal() As Boolean
Dim db As DAO.Database
Dim dtmInstall As Date
'read install date
Set db = CurrentDb
dtmInstall = db.Properties![Install Date]
'check if evaluation period is up
'or user has wound back system date
If dtmInstall > Date + 30 Or Date < dtmInstall Then
IsLegal = False
Else
IsLegal = True
End If
db.Close
Set db = Nothing
End Function
______________________________________________
In the OnOpen event of your splash screen use something like:
If IsLegal() = true then
' Just let them in
Else
MsgBox "Send money or say good-bye", vbOKOnly,"Exiting ..."
End If
I like this because it is reusable. Keep these functions
in a separate module and import them into any database where
you want to use them.
Of course you still need to have an MDE to keep them from
getting at the database properties. And you'll need to send them
a new front-end when they pay.