Automatic Pop Up Message Box

mixedguy

Registered User.
Local time
Today, 02:15
Joined
Jun 12, 2002
Messages
52
Hi,

I don't really know where to start with this. I'm trying to make a pop up message appear on the Database at 10:00 am asking all users to exist the database so I can run my updates. How would I create the Macro/VBCode to do so?

Thanks in Advance!
Todd
 
Todd:

Check this out (posted by an access user with the same problem):

* Create a form, add a timer event to the form.
* Autoexec macro (on open DB macro).
Add the following commands:
- Open the timer form.
- Hide the Timer form (So, users
Cannot see interfere with it).
* On the timer form, Auto set the "On timer" event to activate when the form loads.

Private Sub Form_Load()
Form.TimerInterval = 1000 ‘ 1000 being every 1 second, the timer will run.
Me.Visible = False
End Sub

Add 2 fields to the Form -
1. - Being the = system time
2. Being the Targettime.... (Which is the time you want to kick everybody out)

Add your own variation of code, here’s an example:
(This code will run every 1000, or every 1 second…. Until it finds a match)
Public Sub Form_Timer()
Dim FrmDate As Date
Dim Sysdate As Date
' Set variable values
FrmDate = Me.txttime.Value
Sysdate = Format(Now, "HH:MM:SS")
' When FrmDate = the system clock, run required program.
If FrmDate = Sysdate Then
Docmd.quit
End If
End Sub

You can change the Target time to any time you wish…..
Just make sure you keep the form open at all times.
When the system date = the Target date, because everybody has this form open in the background (Hidden), Everybody will be kicked out of the database.

You could use the same principle for sending a 10 minute warning ….
 
Do you have any simple sample on this automatic Pop Up Message Box please?

Thank you.

Xaysana
 
No, I don't but I have been searching for.

Thanks.

Xaysana
 
Help Understanding this one....

Hi, can someone help me with this? It appears that it will do what I need but I cannot make complete sense of the instructions?

Do I create unbound text boxes on my form or lables?

Thanks.

Fen How
 

Users who are viewing this thread

Back
Top Bottom