How Do You Stop Jerky "Exploding" Forms -
06-25-2004
, 12:57 PM
I have a routine for opening a form from another form.
open original form maximized
use original form.
The opening another form off the original:
Set original form to visible off
Open new form - maximized (pausing execution of code on original form open
routine)
...... Close that form, (recommencing execution of code on original form)
reset original form to visible
re-maximize original form
I find that the forms open (or re-open) at best with a "jerk", at worst as a
visibly "exploding form".
How can I get smooth opening?
Open code:
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--------------------------------
Function FormRepAccessWhere(FRQ As String, Formname As String, FRQName As
String, FRQGridNo As Integer, FRQError As Integer, FRWhere As String)
Dim PrevGridNo As Integer
On Error GoTo Err_FormRepAccessWhere
FRQError = False
Forms(Formname).Visible = False
PrevGridNo = FromWhichObjectNo
FromWhichObjectNo = FRQGridNo
AccessGrid(FromWhichObjectNo) = "OPEN"
If FRQ = "F" Then
DoCmd.OpenForm FRQName, , , FRWhere
ElseIf FRQ = "FARG" Then
DoCmd.OpenForm FRQName, , , , acFormEdit, , FRWhere
ElseIf FRQ = "FR" Then
DoCmd.OpenForm FRQName, , , FRWhere, A_READONLY
ElseIf FRQ = "R" Then
DoCmd.OpenReport FRQName, A_PREVIEW, , FRWhere
Else
End If
Do
DoEvents
If AccessGrid(FromWhichObjectNo) = "CLOSED" Then
Exit Do
End If
Loop
Exit_FormRepAccessWhere:
Forms(Formname).Visible = True
DoEvents
DoCmd.Maximize
FromWhichObjectNo = PrevGridNo
Exit Function
Err_FormRepAccessWhere:
' MsgBox Error$ & Err
FRQError = True
Resume Exit_FormRepAccessWhere |