disable database

J

Josie

I have been asked, by a company, for a full copy of a database that I have
written for 'evaluation purposes' and subject to a succesful evaluation I
would be paid for the same.

They state that if the database is not suitable, they would not pay for its
and return the database to me. The sceptical side of me is concerned that
whilst they might do this there is nothing to stop them keeping a
copy/copies and using it after.

Ideally what I would like to be able to do is something like that after x
days, after the database is installed, the database or features within that
database are disabled.

Is this the best way to deal with the issue or are there better means.

The database in question would be supplied as a mde and is developed on
Access 2002. It is a BE/FE format and it is only the FE that I wish to deal
in this issue.

Any advice and suggestions would be really appreciated.

Josie
 
J

Jeff Conrad

Here are some links/samples that should help with this topic:

http://members.shaw.ca/glenk/access2000.html
Look for the downloads:
"Updated have Database Expire After 30 Days Of Use"

"Updated have Database Expire After 30 Days Of First Being Opened."

MVP Tony Toews' thoughts on demos/expiration coding:
http://www.granite.ab.ca/access/demo.htm

Peter De Baets has a product called KeyedAccess that will do this I believe:
http://www.peterssoftware.com/ka.htm

Paul Overway has something similar here:
http://www.logico-solutions.com/
--Go to Add-ins/Extras area andlook for "Logico Solutions MDB Lock"

Also try here:
http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='LicenseLock'

Good luck,
 
A

Arvin Meyer

You might just build one to self-destruct after 30 days. If they've paid
you, you give them another copy without the self-destructive code. Here's a
piece of code that will chomp up all the other forms after 30 days. Run it
when your main form closes. BTW, it's untested for obvious reasons:

If Date >= #12/12/2004# Then
Dim i As Integer

For i = forms.Count to 1 step -1
If Forms(i).Name <> Me.Name Then 'chomp
DoCmd.DeleteObject acForm, Forms(i).Name
End If
Next i
End If
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
D

Dirk Goldgar

Arvin Meyer said:
You might just build one to self-destruct after 30 days. If they've
paid you, you give them another copy without the self-destructive
code. Here's a piece of code that will chomp up all the other forms
after 30 days. Run it when your main form closes. BTW, it's untested
for obvious reasons:

If Date >= #12/12/2004# Then
Dim i As Integer

For i = forms.Count to 1 step -1
If Forms(i).Name <> Me.Name Then 'chomp
DoCmd.DeleteObject acForm, Forms(i).Name
End If
Next i
End If

Nah, that won't quite work. Maybe this:

If Date >= #12/12/2004# Then
Dim i As Integer
Dim strForm As String

For i = (CurrentProject.AllForms.Count - 1) To 0 step -1
strForm = CurrentProject.AllForms(i).Name
If strForm <> Me.Name Then 'chomp
DoCmd.DeleteObject acForm, strName
End If
Next i

End If
 
J

Josie

Dirk

Have tried your code but it comes up with a 2493 Error msg ObjectName
required. Any ideas why?

Josie
 
D

Dirk Goldgar

Josie said:
Dirk

Have tried your code but it comes up with a 2493 Error msg ObjectName
required. Any ideas why?

It's cause I goofed, that's why. Where I wrote ...

.... it should have been

DoCmd.DeleteObject acForm, strForm

Sorry about that.

Arvin's probably cackling with glee right now.
 
J

Josie

Dirk

That works a treat!!!!!!!!!! - best get some ear plugs fitted for x + 1
day!!

Thanks Jeff, Arvin & Dirk for your help & suggestions

Josie
 
6

'69 Camaro

Dirk Goldgar said:
Nah, that won't quite work. Maybe this:

If Date >= #12/12/2004# Then
Dim i As Integer
Dim strForm As String

For i = (CurrentProject.AllForms.Count - 1) To 0 step -1
strForm = CurrentProject.AllForms(i).Name
If strForm <> Me.Name Then 'chomp
DoCmd.DeleteObject acForm, strForm
End If
Next i

End If

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Nah, that won't quite work, either. From Josie's original post:
The database in question would be supplied as a mde
and is developed on Access 2002. It is a BE/FE format
and it is only the FE that I wish to deal in this issue.

Deleting forms from the MDE file will be a show-stopper. The non-paying
customer will still get to use the database application, albeit with an
error message every time the main form closes, which is probably when the
database closes -- after the customer is done for the day. It's not a very
high price to pay. It's just a minor inconvenience.

However, Josie can put the expiration date logic in some key functions in
the modules, such as:

If (Date < #12/12/2004#) Then
' Execute the code that Josie wrote . . .
Else
MsgBox "This demonstration database application" & vbCrLf & _
" has expired. Please contact Josie at" & vbCrLf & _
"0800 555 5555 for a new copy of this" & vbCrLf & _
"application."
End If

Or Josie can take a look at Jeff Conrad's suggestions for demo software.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
D

Dirk Goldgar

'69 Camaro said:
Nah, that won't quite work, either. From Josie's original post:


Deleting forms from the MDE file will be a show-stopper. The
non-paying customer will still get to use the database application,
albeit with an error message every time the main form closes, which
is probably when the database closes -- after the customer is done
for the day. It's not a very high price to pay. It's just a minor
inconvenience.

Blast! You're absolutely right. I lost sight of that.
However, Josie can put the expiration date logic in some key
functions in the modules, such as:

If (Date < #12/12/2004#) Then
' Execute the code that Josie wrote . . .
Else
MsgBox "This demonstration database application" & vbCrLf & _
" has expired. Please contact Josie at" & vbCrLf & _
"0800 555 5555 for a new copy of this" & vbCrLf & _
"application."
End If

Or Josie can take a look at Jeff Conrad's suggestions for demo
software.

Yes, those are all better suggestions than the form-chomping logic,
which just won't work. Good catch, Gunny.
 
L

Larry Linson

And, if you want, you can obscure the date by gathering pieces of it from
innocuous labels, constants, and variables and constructing it only when the
database starts up.

Too, because it is your database, but the user's data, you should never
"disable" to the extent that they cannot dump out their data in some usable
form... doesn't have to be _convenient_, but should be retrievable... comma
delimited files would be one way.

I don't know if this is a legal requirement, but it certainly seems
ethically sound not to hold the user's data captive just because they
decided against purchasing the product.

Larry Linson
Microsoft Access MVP
 
6

'69 Camaro

Hi, Dirk.
Yes, those are all better suggestions than the form-chomping logic,
which just won't work. Good catch, Gunny.

Thanks. Some of our specialties are in Access database recovery work and
database application "fix-its," and we occasionally have clients who only
have an MDE file in hand and just need a few changes to a form. The MDB
file has long since been lost, and the client usually asks, "But can't you
just replace the old form with a new one? You know -- just delete the old
form and create a new one in the database."

Uh, . . . no.

We explain, "One cannot add or delete forms or reports in an MDE file, and
one cannot add or delete controls on these forms or reports. All we can do
is modify much of the appearance and even many of the behaviors of these
forms and reports in the MDE file -- unless you want us to recover the
_entire_ MDE file," which, of course, isn't cost effective for what would
otherwise have been just a few minor changes.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
A

Arvin Meyer

We explain, "One cannot add or delete forms or reports in an MDE file, and
one cannot add or delete controls on these forms or reports. All we can do
is modify much of the appearance and even many of the behaviors of these
forms and reports in the MDE file -- unless you want us to recover the
_entire_ MDE file," which, of course, isn't cost effective for what would
otherwise have been just a few minor changes.

Good catch. Since all of my work is custom, mostly for other developers, I
rarely even see an MDE much less make one. The ones I have made usually wind
up being replaced by the MDB for the reasons you just outlined.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Top