Howco said:
>>How do I get the code as you stated to generate a single popup even if there are 300 records that have hit the date?
If you want it to fire, say, not more than once a day...
If CDate(GetSetting("YourAppName", "InspectionDate", "DateLastMsgBox", "1900-01-01")) <> Date Then
MsgBox "The Reference Date of: " & dtmRefDate & " has been reached."
SaveSetting "YourAppName", "InspectionDate", "DateLastMsgBox", Format(Date, "yyyy-mm-dd")
End If
That stores the date in a Registry key, and keeps the message from showing more than once per day
per user. (Well, not quite: a user who uses different computers could see it once per day per computer.)