Subform Flickering

mohammadagul

PrinceAtif
Local time
Tomorrow, 01:08
Joined
Mar 14, 2004
Messages
298
Hi
I am using the following Code on the OnCurrent Event of my form. The Problem is , in Access XP or 2000 it works Great but in Access 2003 it starts flickering, unless we bring the cursor to any field of the subform

Private Sub Form_Current()
On Error GoTo Err_Form_Current

If Me.RecordsetClone.RecordCount > 1 Then
Me.ScrollBars = 3
Else
Me.ScrollBars = 0
End If

Exit_Form_Current:
Exit Sub

Err_Form_Current:
MsgBox err.Description
Resume Exit_Form_Current
End Sub
 
I think I have read about the labels [linked to a text box or not] being a problem with Access 2003 causing flickering.

You could try and turn the Echo off and then back on at the end of the function. Put an extra line in your error handler to turn Echo back on just incase there is a runtime error for the application will appear to be frozen if it errors and Echo is left in the off state.

Code:
Private Sub Form_Current()
On Error GoTo Err_Form_Current

If Me.RecordsetClone.RecordCount > 1 Then
DoCmd.Echo False
Me.ScrollBars = 3
Else
Me.ScrollBars = 0
DoCmd.Echo True
End If

Exit_Form_Current:
Exit Sub

Err_Form_Current:
DoCmd.Echo True
MsgBox err.number & " - " & err.Description
Resume Exit_Form_Current
End Sub
 

Users who are viewing this thread

Back
Top Bottom