no****@nospam.com (Scott) wrote in
<wp************@newsfep4-winn.server.ntli.net>:
Problem is the transition between the screens isn't very "smooth",
I guess because of the 2-stage process of opening and maximising.
I get a sort of unsightly flicker between screens.
As someone has suggested, you can open the forms invisible and then
resize and then make them visible, but you could also turn off the
screen before opening and then turn it back on afterwards with:
DoCmd.Echo False
DoCmd.Echo True
OR
Application.Echo False
Application.Echo True
I tend to use Application.Echo because it seems to lead to less
flickering. I'm not sure why, exactly, but I would guess it's
because it happens at a level higher than DoCmd, but I'm not
convinced by that, either.
The only downside of this is that you have to make sure you have
error handlers in any code that turns off the screen, or your users
might think that the application has locked up if an error occurs.
In your case, if you're doing the same thing in opening all your
forms, you could write a wrapper subroutine with error handling to
do this, something like:
Public Sub FormOpen(strForm As String, _
Optional lngView As Long = acNormal, _
Optional strCriteria As String, _
Optional lngMode As Long = acWindowNormal, _
Optional strOpenArgs As String)
On Error GoTo errHandler
Application.Echo False
DoCmd.OpenForm strForm, lngView, , strCriteria, , _
lngMode, strOpenArgs
exitRoutine:
Application.Echo True
Exit Sub
errHandler:
MsgBox Err.Number & ": " & Err.Description, vbExclamation, _
"Error in FormOpen()"
Resume exitRoutine
End Sub
Now, I haven't implemented all the arguments for DoCmd.OpenForm,
and you might want to do so. But you get the idea, I think.
--
David W. Fenton
http://www.bway.net/~dfenton
dfenton at bway dot net
http://www.bway.net/~dfassoc