DoCmd.Echo True/False

G

Guest

Hi,
I have tried this option but it does not work in my case.
What I'm tring to do is hide the database window when I display my own
forms. But I can see it appearing and disappearing in the background which is
not very professional.
Here is some simple code on a form_Load event.
' ************************************
Private Sub Form_Load()
DoCmd.Echo False
DoCmd.SelectObject acForm, "frmReports", True
RunCommand acCmdWindowHide
DoCmd.Echo True
End Sub
' ************************************
What's wrong with my way of doing?
Thanks.
 
G

Guest

Try and move the RunCommand acCmdWindowHide to the start of the code.
Or even better, when the application start running
 
G

Guest

Hi Douglas,
There are two problems in my post (4 line of code). I first need to hide the
database window from the user's view and the only way I found is to select a
form in it and then use the "RunCommand acCmdWindowHide" instruction. It
works all right but the flickering of the screen is visible and I would like
to run it in the background. I know that "Application.ScreenUpdating = False"
is the VB way of doing so I searched the newsgroup and found the "DoCmd.Echo
False" command. I tried it but it does not do the job (in my case).

If there is another easier way to hide the database window, please let me
know. It should be something like :
DatebaseWindow.Visible = False

If there is a way to hide the screen updating while this is happening,
again, please say so.

I do not understand why you say : "Use DoCmd.OpenForm instead". Could you
explain a bit, please?

Thank you for your comment.
 
G

Guest

Hi Ofer,
The command "RunCommand acCmdWindowHide" is in the Form_Load event and is
the only thing I do there. I just want to hide the window display from the
user's eyes. Why can I not just write:
DatabaseWindow.Visible = False?

Thanks for your comment.
 

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