notification

lakshmi_pili

Registered User.
Local time
Today, 16:32
Joined
May 9, 2001
Messages
10
I have a form with a registration date. What I would like to do, but do not know if it is possible or do not know how to do it, is that it should look at the registration date, and if it is 30 days or 60 days for that matter, a notification should pop up for that particular record telling the user who is entering the data that the expiration date is due?

Can someone suggest/help me with this?

Thank you.
 
Add a label named lblNotify on your form and type "Expiration date is approaching!" (or whatever you want to see) in the caption. Then, try this code in your "On Current" Event of your Form.

Replace txtRegDate with the name of your own registration date fieldname.

Dim intDaysExp As Integer

txtRegDate.SetFocus
intDaysExp = DateDiff("d", Now(), txtRegDate.Value)
If intDaysExp < 30 Then
lblNotify.Visible = True
Else
lblNotify.Visible = False
End If

Should work just fine.
Tess


[This message has been edited by TessB (edited 06-03-2002).]
 
Thank you for your response. I tried the code, and have run into a few problems.

First it displayed it on every record with the exception of those which did not have a registration date (at the beginning they did not add a date when the database was created) so I figure I change the "<" sign to an "=". Needless to say, it does not display any more, and I have tried searching for dates that would match the requirement.

Another question I have is whether it will be possible for it just to pop up a window with all of the names whose registration is due? The reason I am asking is because they have over 5000 records right now, and it keeps increasing. They will not be able to go through every record to see which one is due.

Tried to tell them that it would probably be easier to generate a report, but they want a pop up window - go figure!

Thanks for any suggestions!
 

Users who are viewing this thread

Back
Top Bottom