Thread: Access Viewer
View Single Post
  #25  
Old August 13th, 2004, 12:24 AM
Fred Boer
external usenet poster
 
Posts: n/a
Default [OT] Access Viewer

Hi Jeff!

Yes, we got back last night, and today I've been wringing out all the
sopping wet clothes and camping gear from the soaking they got in Cape
Breton!

I've never actually used macros, and I couldn't make your instructions work
(my fault I am sure!), but when I put the code behind a command button I got
the desired effect. So *that's* what you are talking about... I thought it
was the add-in, and you were just giving yourself a bit more realistic lead
time!! (g,d,r.... as fast as possible!)

Fred

P.S. Thanks for helping with my database... obviously no hurry. I'll be in
touch privately as soon as I get a bit more time...


"Jeff Conrad" wrote in message
...
"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*