troubleshooting Question

how to expire an access database that can be reactivated via password

Avatar of tucup
tucup asked on
Microsoft AccessVisual C++.NETWindows Server 2008
24 Comments1 Solution355 ViewsLast Modified:
I have an access 2007 database that I want to have expire or lock after say 60 days. During or after be re activated via a password or something.
Basically, I am not a programer but spent the last 3 months putting a database with forms etc for a client and as they do not wat to pay a great deal for it I have told them I own the database program (excuse my terms). What I would like to do, so as to safeguard my work, is to have a time out feature that I can reset perhaps if it does lock/ expire.
I found this on Expert Exchange but could not get it to work.
any advice would be greatful

Private Sub Form_Load()
Dim myRecordedDate As String
'lookup date
myRecordedDate = Nz(DLookup("dtExpire", "ExpireTable"), "Empty")
'insert expiry date if there is none
If myRecordedDate = "Empty" Then
  CurrentDb.Execute "INSERT INTO ExpireTable (dtExpire) VALUES " & Chr(34) & Format(Now(), "dd-mmm-yy") + 30 & Chr(34) & ";"
End If
If myRecordedDate >= Now() Then
  'let em in
End If
End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 24 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 24 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros