Thread: Access Viewer
View Single Post
  #24  
Old August 12th, 2004, 11:25 PM
Jeff Conrad
external usenet poster
 
Posts: n/a
Default [OT] Access Viewer

"Fred Boer" wrote:

*281 Days Left*

And counting!! ;=)))


You might be the only one who understands what that is.
;-)


Oh no, she's not!


Very good Fred!

Are you back? I thought you were still gone?
Strange coincidence, I was just working on your database a few minutes ago (serious).

So you never forget Fred:

1. Create a new blank database called Countdown

2. Copy/Paste the following code to a new standard module:

' Begin Code
Public Function funcCountdown()
On Error GoTo ErrorPoint

Dim strMessage As String
Dim TargetDate As Date

TargetDate = "05/19/2005"

strMessage = Chr$(83) & Chr$(116) & Chr$(97) & Chr$(114) & " " _
& Chr$(87) & Chr$(97) & Chr$(114) & Chr$(115)
strMessage = strMessage & " " & Chr$(45) & " "
strMessage = strMessage & Chr$(69) & Chr$(112) & Chr$(105) & Chr$(115) _
& Chr$(111) & Chr$(100) & Chr$(101) & " " _
& Chr$(73) & Chr$(73) & Chr$(73)
strMessage = strMessage & vbNewLine
strMessage = strMessage & Chr$(34) & Chr$(82) & Chr$(101) & Chr$(118) _
& Chr$(101) & Chr$(110) & Chr$(103) & Chr$(101) & " "
strMessage = strMessage & Chr$(111) & Chr$(102) & " " & Chr$(116) & Chr$(104) _
& Chr$(101) & " " & Chr$(83) & Chr$(105) & Chr$(116) & Chr$(104) & Chr$(34)
strMessage = strMessage & vbNewLine & vbNewLine
strMessage = strMessage & Chr$(79) & Chr$(112) & Chr$(101) & Chr$(110) _
& Chr$(105) & Chr$(110) & Chr$(103) & " - "
strMessage = strMessage & TargetDate
strMessage = strMessage & vbNewLine & vbNewLine
strMessage = strMessage & Chr$(68) & Chr$(97) & Chr$(121) & Chr$(115) _
& " " & Chr$(108) & Chr$(101) & Chr$(102) & Chr$(116) & Chr$(58) & " "
strMessage = strMessage & DateDiff("d", Now, TargetDate)

MsgBox strMessage, vbExclamation, "Mark Your Calendar!"

DoCmd.Quit

ExitPoint:
Exit Function

ErrorPoint:
MsgBox "The following error has occurred:" _
& vbNewLine & "Error Number: " & Err.Number _
& vbNewLine & "Error Description: " _
& Err.Description, vbExclamation, _
"Unexpected Error"
Resume ExitPoint

End Function
' Code End

3. Compile the code and save the module as modCountdown

4. Create a new macro with RunCode as the action and funcCountdown() as the Function Name.

5. Save the macro with the name AutoExec so it will run on Startup

6. Go to Tools--Startup and uncheck the Display Database Window option

7. Close the database and create a desktop shortcut icon and launch it any day you want to find out
how many days are left till the BIG day!!

;-)

--
Jeff Conrad
Access Junkie
Bend, Oregon
*280 Days Left*