Timer function interrupted

G

Guest

I have a pop up form that I’m trying to use as a progress meter that works
off the forms timer property. The following code works great when there is no
other code working on another form, for example, DoCmd.RunSQL. If I put the
objects on the main form I still find it interrupted by other code.
Does running SQL stop the timer function on a form as apparently it seems to?

If MForm.[MeterBase].Tag = "Forward" Then
MForm.[Meter].Width = MForm.[Meter].Width + 0.01 * 1440
If MForm.[Meter].Width > 1.975 * 1440 Then MForm.[MeterBase].Tag =
"Backward"
Else
MForm.[Meter].Width = MForm.[Meter].Width - 0.01 * 1440
If MForm.[Meter].Width < 0.025 * 1440 Then MForm.[MeterBase].Tag =
"Forward"
End If
If Not MTask Then DoCmd.Close acForm, MForm.Name: SendKeys "{F11}", True

Thanks for your input.
Mark
 
G

Guest

The SendKeys was only a short cut to exit while testing.
I can open separate instances of the popup form (sep mdb) and all work well
together. I find it impossible to use the clock in this fashion while
performing any CPU intensive tasks. The clock will freeze? while the
processing continues. When the processing is done, the meter/clock will then
continue to run. Is this system priority beyond user control?
M


Douglas J. Steele said:
Even if it doesn't, you're only asking for trouble using SendKeys.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Mark CHP IMD said:
I have a pop up form that I'm trying to use as a progress meter that works
off the forms timer property. The following code works great when there is
no
other code working on another form, for example, DoCmd.RunSQL. If I put
the
objects on the main form I still find it interrupted by other code.
Does running SQL stop the timer function on a form as apparently it seems
to?

If MForm.[MeterBase].Tag = "Forward" Then
MForm.[Meter].Width = MForm.[Meter].Width + 0.01 * 1440
If MForm.[Meter].Width > 1.975 * 1440 Then MForm.[MeterBase].Tag =
"Backward"
Else
MForm.[Meter].Width = MForm.[Meter].Width - 0.01 * 1440
If MForm.[Meter].Width < 0.025 * 1440 Then MForm.[MeterBase].Tag =
"Forward"
End If
If Not MTask Then DoCmd.Close acForm, MForm.Name: SendKeys "{F11}",
True

Thanks for your input.
Mark
 
D

Douglas J. Steele

I suspect it is beyond user control.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Mark CHP IMD said:
The SendKeys was only a short cut to exit while testing.
I can open separate instances of the popup form (sep mdb) and all work
well
together. I find it impossible to use the clock in this fashion while
performing any CPU intensive tasks. The clock will freeze? while the
processing continues. When the processing is done, the meter/clock will
then
continue to run. Is this system priority beyond user control?
M


Douglas J. Steele said:
Even if it doesn't, you're only asking for trouble using SendKeys.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Mark CHP IMD said:
I have a pop up form that I'm trying to use as a progress meter that
works
off the forms timer property. The following code works great when there
is
no
other code working on another form, for example, DoCmd.RunSQL. If I put
the
objects on the main form I still find it interrupted by other code.
Does running SQL stop the timer function on a form as apparently it
seems
to?

If MForm.[MeterBase].Tag = "Forward" Then
MForm.[Meter].Width = MForm.[Meter].Width + 0.01 * 1440
If MForm.[Meter].Width > 1.975 * 1440 Then MForm.[MeterBase].Tag
=
"Backward"
Else
MForm.[Meter].Width = MForm.[Meter].Width - 0.01 * 1440
If MForm.[Meter].Width < 0.025 * 1440 Then MForm.[MeterBase].Tag
=
"Forward"
End If
If Not MTask Then DoCmd.Close acForm, MForm.Name: SendKeys "{F11}",
True

Thanks for your input.
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top