Strange effect when closing form

M

mscertified

I have a form that the users can set filters to view a subset of records.
They can then page thru the records one at a time.
When they do this and then press my Exit button, the screen flickers almost
like its closing down the form multiple times once for each record that was
viewed. What could cause this?
 
G

gllincoln

Hi Rupert,

Whenever I get the screen jitter effect, I check out my events. In this
instance, try inserting a break on the Exit button's click event, and step
through the code execution using (F8) - you probably have events defined
that are tripping over each other; instead of an orderly and logical exit,
the events may be bouncing off each other like Pachinko balls.

Hope this helps,
Gordon
 
M

mscertified

Private Sub txtExit_Click()
On Error GoTo ER
If Me.Dirty Then
If ValidateForm() Then
DoCmd.Close acForm, "frmHDTicket"
End If
Else
DoCmd.Close acForm, "frmHDTicket"
End If
Exit Sub
ER:
If Err.Number = 2465 Then '???
Resume Next
Else
Call ErrMsg(Err.Number, Err.Description, "txtExit_Click")
End If
End Sub
 
A

Allen Browne

You will have to dig further. The code you posted calls another routine
named ValidateForm(), so you will need to look there also.
 

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