Copyright notice or else...

D

Duck

I have a database that I have place a copyright notice on in the form
of a splash page that is displayed first for six seconds in the
startup sequence. Although I took precautions to secure the database
I suspect that one of the users has or will copy the database to
another computer. I also have a bit of code that will delete all the
queries in the database after a certain date:

If (Now() > #8/30/2007#) Then
Dim MedDB As DAO.Database
Dim qdf As QueryDef
Set MedDB = CurrentDb
For Each qdf In MedDB.QueryDefs
DoCmd.DeleteObject acQuery, qdf.Name
Debug.Print qdf.Name & " Deleted"
Next qdf
Else
'Debug.Print "It is not time yet"
End If

I want to insure that the splash page copyright notice is displayed
first in the startup sequence. How can I set the above code to run if
the splash page is taken out of the startup sequence.
 
G

Guest

I suppose one method would be to have your splash screen initialize a global
variable. Then, call your function from the startup code of a switchboard
form (or possibly from the load event procedure of every form and report),
conditionally running it depending on the value of the global variable. Of
course, you'll need to distribute in the compiled .mde form only, or else it
would be child's play to undo this.

Another method might be to re-open your splash screen in hidden mode after 6
seconds. Conditionally run your code based on attempting to read some control
on your splash screen. This might be safer than the global variable method.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
A

Arvin Meyer [MVP]

The only time I ever bombed queries like that, I wound up having to drive
200 miles to replace a front-end after I was paid. I had reason to think
that I wouldn't be paid, so I created a 30 day bomb to delete queries. It
turned out that I was paid in time, and the client had lost Internet
connectivity so the only way I could ensure that he would proceed without
incident is to drive to his place of business. That cost me about $800
dollars but taught me a large lesson.

I suggest that you use Tom's method with a global variable or hidden form to
simply shut down the application if the splash screen is not displayed. In
your splash screen, make sure that you prominently display your name and
phone number so honest employees can give you a call if your copyright is
breeched.
 
G

Guest

Hi Arvin,

I was going to say the same thing. I had typed out similar advice, but then
deleted it, because I didn't want to get into some philosophical discussion,
with someone else--not necessarily the OP--who thought they knew better. But,
yes, I would just issue a Quit command like you suggest. Thanks for sharing
your pain.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

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