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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reminder/Alerts

Status
Not open for further replies.

troix

Technical User
Jan 20, 2004
46
0
0
US
I have SEVERAL documents in a SUB FORM named "GRANTS"

I have 3 dates entered into "GRANTS"

Date1
Date2 and
Date3

I need it so that if it is one of these dates or AFTER, a box will come up saying there is an alert saying "GRANT REMINDER NAME (from the main form) on DATE(x)" and if OK is clicked, it won't remind you again until Date2

Hopefully this makes sense.
 
Ok,

I think I get what you're on about.

You will need to add three more fields to your table with the dates in them. They need to be Bolean (or checkboxes).

Let's name them chkDate1, chkDate2 and chkDate3

When the form opens, the code goes into the "On Current" area and should look something like this

Code:
Private Sub Form_Current()
If (Me.Date1 <= Date) And (Me.chkDate1.Value = False) Then
    If MsgBox("GRANT REMINDER ON " & Format(Date1, "dd-mmm-yy") & " CONTINUE?", vbYesNo + vbQuestion) = vbYes Then
    Me.chkDate1 = True
    End If
ElseIf (Me.Date2 <= Date) And (Me.chkdate2.Value = False) Then
    If MsgBox("GRANT REMINDER ON " & Format(Date2, "dd-mmm-yy") & " CONTINUE?", vbYesNo + vbQuestion) = vbYes Then
    Me.chkdate2 = True
    End If
ElseIf (Me.Date3 <= Date) And (Me.chkDate3.Value = False) Then
    If MsgBox("GRANT REMINDER ON " & Format(Date3, "dd-mmm-yy") & " CONTINUE?", vbYesNo + vbQuestion) = vbYes Then
    Me.chkDate3 = True
    End If
End If

End Sub

Hope this helps

Cheers

Jedel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top