BobJacksonNCI
Technical User
TIA!
I'd like to know the difference between DoCmd and RunCommand.
Background: I was asked if a Powerpoint presentation could be password protected. The answer is no, Powerpoint does not include that capability. But Access does. So I created an Access database with a designated startup form and On Open event code shown following this dialogue. (Works perfectly.) Note that I commented the line beginning with RunCommand. That line is interchangeable with the following line - DoCmd.RunCommand. Since I'm hoping this isn't my last assignment, I wondered what the differences are. I.E., which situations call for DoCmd and which call for RunCommand. Understanding will shorten my searches in Help and in Microsoft's knowledgebase.
Dim retval As Double
retval = Shell("c:\program files\microsoft office\office\powerpnt.exe f:\rjackson\Projects\MISCELLANEOUS\vestalnewhire.ppt", 3)
'RunCommand acCmdClose 'CLOSE THE ACCESS APP
DoCmd.RunCommand acCmdClose 'CLOSE THE ACCESS APP
DoCmd.Quit 'QUIT ACCESS
I'd like to know the difference between DoCmd and RunCommand.
Background: I was asked if a Powerpoint presentation could be password protected. The answer is no, Powerpoint does not include that capability. But Access does. So I created an Access database with a designated startup form and On Open event code shown following this dialogue. (Works perfectly.) Note that I commented the line beginning with RunCommand. That line is interchangeable with the following line - DoCmd.RunCommand. Since I'm hoping this isn't my last assignment, I wondered what the differences are. I.E., which situations call for DoCmd and which call for RunCommand. Understanding will shorten my searches in Help and in Microsoft's knowledgebase.
Dim retval As Double
retval = Shell("c:\program files\microsoft office\office\powerpnt.exe f:\rjackson\Projects\MISCELLANEOUS\vestalnewhire.ppt", 3)
'RunCommand acCmdClose 'CLOSE THE ACCESS APP
DoCmd.RunCommand acCmdClose 'CLOSE THE ACCESS APP
DoCmd.Quit 'QUIT ACCESS