Auto delete module

T

Tom Bock

I'm working on a project for one of my college classes. One thing the
client asked me for is some kind of auto-delete functionality for a module.

The delete has to be dynamic as the user would set the amount of days since
the post date before it gets auto deleted.

How would I go about doing this? Let's say "delete macro xyz 30 days from
now?

Thanks,
Tom
 
L

Larry Linson

Tom Bock said:
I'm working on a project for one of my college classes. One thing the
client asked me for is some kind of auto-delete functionality for a
module.

Please explain "auto-delete functionality for a module". You want the DB to
self-destruct after a certain period of time? That's an unfunny prank to
pull on anyone.
The delete has to be dynamic as the user would set the amount of days since
the post date before it gets auto deleted.

What do you mean by "the post date"?
How would I go about doing this? Let's say "delete macro xyz 30 days from
now?

Why would one want to delete a macro after a certain period of time?

"Project for one of my college classes" and "the client asked" don't seem
consistent.

Larry Linson
Microsoft Access MVP
 
T

Tom

Larry,

thanks for the feedback...

I understand your concern, but this is not a prank. I posted this question
out of curiousity.

What I meant to say is that I'm taking a VBA class right now and -- while
at work -- a client asked me that question. I couldn't answer it... so
maybe he wants to do some destruction (not sure though). I simply wanted
to be prepared to answer his question (cautionsly w/ some knowledge).

The question I was asked was "how can a module be auto-deleted, let's say on
11-29-2005"

Thanks,
Tom
 
J

Jesper Fjølner

The question I was asked was "how can a module be auto-deleted, let's say
on 11-29-2005"

You can use something like this in an AutoExce macro or on your main forms
Open event:

If date = #11-29-2005#
docmd.DeleteObject acModule ,"module1"
End if



Jesper Fjølner
 
J

Jesper Fjølner

The question I was asked was "how can a module be auto-deleted, let's say
on 11-29-2005"

I've used something like that when sending people demos of a database or
want to let someone try it first. I set an expiration date a couple of
months in the future, so that the database is rendered useless after af
certain date. I set it to delete a couple of the mains forms.
If they buy the database, I'll send them a new file with the delete-lines
commented out.
 
T

Tom

Ah, I see... well that makes sense. As a matter of fact, many of us have
experienced this when trial versions expired.

Thanks, I appreciate the info. I'll inquire further info from the client
to determine if his intends are "malicious" or if they are of the nature
"expire trial version".

Tom
 

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