Nearly there.

javajom

Javajon
Local time
Today, 14:27
Joined
Mar 5, 2008
Messages
37
Well I've done it and it works except for one thing, it won,t autostart when I open the database. The cde is:

PHP:
Public Function fShowMsgAutoExec()
Dim Pass_Word As String
Dim sh As String
Pass_Word = "jon"
If Date >= DateSerial(2007, 1, 30) Then
fShowMsg = MsgBox("This database needs maint, do you know the code?", vbYesNo)
If fShowMsg = vbYes Then
sh = InputBox("Enter the Password")
If Pass_Word = sh Then
MsgBox ("Please remember to reset macro date.")
End If
If sh <> Pass_Word Then
MsgBox ("Sorry that was incorrect, please contact creator.")
Application.Quit
End If
End If
End If
End Function

please help?
 
You have to run it from an AutoExec macro.

So, open up a new MACRO (not code) and select the Action RUN CODE and then select fShowMsgAutoExec() and then save the MACRO and name it AutoExec

It will then run your code automatically.
 

Users who are viewing this thread

Back
Top Bottom