Forum Discussion
Cyber_Learning
Mar 08, 2023Copper Contributor
Timer Event Popup Reminder
Hello Forum Members I currently have the following Timer event, which is working. The "valid" is valid dates in a table. If the valid date is passed, the Timer event kicks in. But, I also want to...
arnel_gp
Mar 10, 2023Steel Contributor
try this code:
Private Sub Form_Timer()
Dim ExpiredCount As Long
ExpiredCount = DCount("1", "CPR_Biopsy", "Valid <= #" & Format$(DateAdd("m", 5, Date), "mm/dd/yyyy") & "#")
If ExpiredCount <> 0 Then
'Kill the timer
Me.TimerInterval = 0
DoCmd.OpenForm "CPR_Biopsy_Notice"
End If
End Sub
Private Sub Form_Timer()
Dim ExpiredCount As Long
ExpiredCount = DCount("1", "CPR_Biopsy", "Valid <= #" & Format$(DateAdd("m", 5, Date), "mm/dd/yyyy") & "#")
If ExpiredCount <> 0 Then
'Kill the timer
Me.TimerInterval = 0
DoCmd.OpenForm "CPR_Biopsy_Notice"
End If
End Sub