valid rule...info bug get rid of it.

  • Thread starter Thread starter mission2java_78
  • Start date Start date
M

mission2java_78

Guest
I have code which causes a button to blink (label goes on and off underneath the button). When it triggers and I try to press another button or enter text into another field I get this attached message box. How or what triggers this? How can I get rid of this?
Jon
 

Attachments

Difficult to know for sure but I would imagine the error message is somewhat misleading. I am assuming tht you have a sub-procedure running that enables the blinking action which is fired by a timer. OK so far???
If so then you probably need to stop that sub procedure before you move on with any action that is attached to other form elements. Maybe in the BeforeUpdate of the text field or the Enter event of a command button??
Hope this helps
Chris
 
Offhand it is hard to say.

Do you have a macro or docmd.action type operation underlying the command button? If so, what does it do?

Things that come to mind include an implied .SetFocus or perhaps some sort of .Undo function or .Cancel function implied in the OnTimer section of your program. Are there any commands in that? Or procedure calls that imply a command?
 
No macro in this.
No docmd.action either.
Basically once the task gets completed and is checked off the next task becomes active and my email button blinks to remind the user to click the email button.
In the onfocus event of the email button i do this:

While FlashEmail = True
Dim timer As Integer
Dim start As Date
start = Now()
timer = 0.1
FlashEmail = True
Do While FlashEmail = True
If Now() > DateAdd("s", timer, start) Then
Me.cmdEmail.Transparent = Not Me.cmdEmail.Transparent
start = Now()
End If
DoEvents
Loop
Wend

The reason this triggers is because I set the focus to this button in some code. So the button blinks.
In the lost focus event I have:

FlashEmail = False
Me.cmdEmail.Transparent = False

Now this works BUT it works after I get one of those validation rule errors that I posted. I dont want to see any of these errors.
Jon
 
You could try putting your snippet in the mousedown event for a button and try that.

Code:
FlashEmail = False 
Me.cmdEmail.Transparent = False


Or try getting the err.number for that error. I have never seen that one before so don't have any real working methods for it.
 
I dont want that to go away based on a mouse down. The error happens because while the code is executing and its a while loop it cannot process any updates. As soon as the focus is lost it will stop...but right beffore that focus is lost I get what is attached (the error).
jon
 

Users who are viewing this thread

Back
Top Bottom