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
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) & ";"
If myRecordedDate >= Now() Then
'let em in