Form Timer Question

  • Thread starter hotrod1952 via AccessMonster.com
  • Start date
H

hotrod1952 via AccessMonster.com

I have a form that has the following code:
'some code here.....
If ec <> 0 Then
'Code to question write record goes here
IntMsg = 3 'set value of intmsg for answer back from form
StrMsg1 = "Do You Want to Save Current Form Data to: " & vbCrLf & "PC
Data Table Program #" & ProgramNo & "?"
DoCmd.OpenForm "msgbx", , , , , acDialog, [StrMsg1]
If IntMsg = 0 Then
Exit Sub
ElseIf IntMsg = 1 Then
Me.LogoLabel.Caption = 2 'turn logoflash routine on
Me.TimerInterval = 300 'turn on logoflash timer and set rate for
flash
'msgbox "wait"
'DoCmd.Hourglass True 'turn on hourglass during write
Call Check_ec

If Noec <= 40 Then
Call WriteDataToTable
Else
DoCmd.Hourglass False
vte = 1
ec = 0
Exit Sub
End If
Else
End If
IntMsg = 3 'reset value to 3 after use as response from form
Else
vte = 1
End If
'more code here ....


i have the following code in the form timer event

Private Sub Form_Timer() 'timer event used to flash image during write
operation

Me.LogoLabel.Caption = Me.LogoLabel.Caption - 1
Select Case Me.LogoLabel.Caption
Case 0
Me.TcsLogo1.Visible = True
Me.LogoLabel.Caption = 2
Case 1
Me.TcsLogo1.Visible = False
End Select
End Sub

What I had was the hourglass turn on then call ec routine runs(checks form
entries to verify correct data type was entered) Then Call Writedatato table
(Writes form data to the table).
What I would like to do is eliminate the hourglass and use a timer event to
cycle my image(Tcslogo1)
What happens is if I allow the msgbox text the image flashes until msgbox is
closed the the image stays on or off depending on where it was when
messagebox was cancelled. (So i know the timer event is functional.) I tried
inserting a doevents where i has msgbox "wait" to no avail. What am i missing?
 

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