[AccessD] Jumping Screen Fix - now I know how but not why

Jim Dettman jimdettman at verizon.net
Wed May 23 08:16:27 CDT 2012


 I have code to insert a call to a procedure for an event (below).  Note the
setting of OnActivate and OnDeactivate

Jim.

Function DoAllForms_DesignModeChange() As Integer

        ' This function loops through all Forms

        Dim db As Database
        Dim MyDocument As Document
        Dim i
        Dim intRet As Integer

10      Set db = DBEngine.Workspaces(0).Databases(0)

20      For i = 0 To db.Containers("Forms").Documents.Count - 1

30        Set MyDocument = db.Containers("Forms").Documents(i)
40    Debug.Print " > Document: "; MyDocument.Name;
50    Debug.Print ""

60        If MsgBox("Update " & MyDocument.Name, vbYesNo) = vbYes Then
70          DoCmd.OpenForm (MyDocument.Name), A_DESIGN

            'Forms(MyDocument.Name).MaxButton = False
            'Forms(MyDocument.Name).ShortcutMenu = False
            'Forms(MyDocument.Name).NavigationButtons = False
            'Forms(MyDocument.Name).AllowFilters = False

            'Forms(MyDocument.Name).HelpFile = "HRAPP.HLP"
            'Forms(MyDocument.Name).HelpContextId = 99999

            'intRet = glrChangePermission(1, MyDocument.name, "USERS",
DB_SEC_FRMRPT_EXECUTE, True)

            'If Mid$(NZ(Forms(MyDocument.name).OnClose, ""), 1, 4) = "=Std"
Then
            '  Forms(MyDocument.name).OnActivate = "=StdFormCT([Form]," &
Chr$(34) & "OnActivateForm" & Chr$(34) & "," & Chr$(34) & Chr$(34) & ")"
            '  Forms(MyDocument.name).OnDeactivate = "=StdFormCT([Form]," &
Chr$(34) & "OnDeactivateForm" & Chr$(34) & "," & Chr$(34) & Chr$(34) & ")"
            'End If

130         DoCmd.Close A_FORM, (MyDocument.Name), acSaveYes
140       End If
150     Next i

160     DoAllForms_DesignModeChange = True

End Function 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Wednesday, May 23, 2012 12:04 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Jumping Screen Fix - now I know how but not why

 
Dear List:
 
As you know I have been struggling with the problem of the 'jumping screen'
in a 2003 mde when a form opens. 
 
After trying many things to analyze the problem and fix it,  I finally hit
upon adding DoEvents in the Resize event of every form, and that appears to
have solved the problem.  
 
So that's the how to fix it, but why I don't know.  I'm just curious - does
anyone have any insights?
 
So the fix is in on version 23.  Unfortunately I am now working on version
24 so I have to insert DoEvents into all of the forms - and there a lot of
them.  Does anyone have a snippet of code that would insert the event in
every form?  Or a site where I might find such a piece of code?
 
MTIA
 
Rocky Smolin
Beach Access Software
858-259-4334
www.bchacc.com <http://www.bchacc.com/> 
www.e-z-mrp.com <http://www.e-z-mrp.com/> 
Skype: rocky.smolin
 
 
 
 



More information about the AccessD mailing list