Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tickler Form 1

Status
Not open for further replies.

deadhead7

Programmer
Apr 18, 2003
57
US
I need to build a tickler form that will popup and remind a user to do something. For instance: if the are logged on to a database and the form was set to remind them on feb 20th to do something, then I would like a form to popup and remind the user they need to do something. Can this be done.
 
You could build in a check on Form load that looks at the current date:
Code:
myDate=Date
If myDate=Date(2/20/04) then
 (open form, pop up msg box, etc).
End if

You might want to look at different formatting for Date() to make sure the system date that Date uses is what you have in the check.

Hope that helps.


DreamerZ
simplesolutions@prodigy.net
[ignore][/ignore]
 
If you go into the properties of the form, select the Event Procedure for the OnOpen function. Click the ... to the right of the function and the VBA screen will open.

You should see something like:
Code:
Private Sub Form_Open(Cancel As Integer)
(place the code here)
End Sub
What this does is everytime the form is open it runs the code. So, if myDate = 2/20/04 then the code is run. If it doesn't then the Sub ends. You might want to read up on the Date Function for more information on it's format.
Your code could look something like this:
Code:
    myDate = Date
    If myDate = "2/20/2004" Then
        MsgBox "Date checked"
    Else: MsgBox "Wrong Date"
    End If

Camaris: Your's can be done too. Take a look at the DatePart function for information on pulling out a specific day. I think Monday is equivalent to Day=2. Your code could look like this:
Code:
    If DatePart("w", Date) = 2 Then
        MsgBox "Date checked"
    Else: MsgBox "Wrong Date"
    End If
The "w" stands for the Interval Weekday.

Hope that helps.


DreamerZ
simplesolutions@prodigy.net
[ignore][/ignore]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top