problem with RunCommand accmdWindowClose work

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top