javajom
03-08-2008, 11:54 AM
Well I've done it and it works except for one thing, it won,t autostart when I open the database. The cde is:
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?
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?