problem with RunCommand accmdWindowClose work

P

Philip

Hi,

In my Splash form the code checks for the users access rights, then it is
supposed to show the main user switchboard (this is for Normal user), select
the DB Window and close it.

DoCmd.OpenForm "Main Switchboard", acNormal, , , , acWindowNormal

DoCmd.SelectObject acForm, , True
DoCmd.RunCommand acCmdWindowHide

But I get an error message 'RunCommand' is not available.

I am hoping to ensure that the DB Window is always closed automaticlly as
the users window is opened (just in case somehow it is open)

thanks for any advice

Philip
 
M

mcescher

Hi,

In my Splash form the code checks for the users access rights, then it is
supposed to show the main user switchboard (this is for Normal user), select
the DB Window and close it.

DoCmd.OpenForm "Main Switchboard", acNormal, , , , acWindowNormal

DoCmd.SelectObject acForm, , True
DoCmd.RunCommand acCmdWindowHide

But I get an error message 'RunCommand' is not available.

I am hoping to ensure that the DB Window is always closed automaticlly as
the users window is opened (just in case somehow it is open)

thanks for any advice

Philip

Why don't you just hide the database window on startup?
From the Tools menu, choose Startup, and then uncheck Display Database
Window.

This will automatically hide it.

HTH,
Chris M.
 

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