Show pop up message every hour "Not registered..."

irade92

Registered User.
Local time
Today, 15:41
Joined
Dec 26, 2010
Messages
229
Hi
I want to show a pop up message every hour just to remember the client.."Not registered or so..."
Any idea how to do it with VBA?
 
First, you need a form to be open for the lifetime of the session. The form COULD be minimized and could even be made invisible if necessary, but it has to stay open.

Next, put an OnTimer event on the form to trap timer events. This is where you might place your OK-only message box. See next entry for the number, but here is where you RELOAD the timer - and do the message box AFTER you reload the timer.

Finally, have the Form_Load code load your form's .Timer property with a time of 3600000 (3.6 x 10^6 as an integer). That is one hour in milliseconds.

As a nice point but it really isn't required, have the background/minimized/invisible form's OnClose code reset the form's Timer slot to 0.
 
Thanks a lot
After a short thinking I found this solution..and it works perfectly

Code Tags Added by UG
Please use Code Tags when posting VBA Code

Please feel free to Remove this Comment
https://www.access-programmers.co.u...e-use-code-tags-when-posting-vba-code.240420/

Code:
Private Sub Form_Timer()
     If DatePart("n", Now()) = 0 And DatePart("s", Now()) = 0 Then
        MsgBox "Please pay your bill... ..."
     End If
     
End Sub

THIS IS IN MAIN FORM AND INTERVAL IS 1000
 
Last edited by a moderator:

Users who are viewing this thread

Back
Top Bottom