UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Opening Ms Access    
 
   
Penguin629
post May 16 2016, 11:37 AM
Post#1



Posts: 11
Joined: 19-August 15



hi,

I'd like to open MS Access application in Access 2010. I've got it working below.
How do I pass the password to the application since I've now password protected it.


CODE
Dim objShell
Dim objShell2
Dim appClose
'This section will run  Access 2010. App Will not open in 2007.
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("""C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE"" ""C:\Users\Admin\Desktop\test.accdb")
Go to the top of the page
 
theDBguy
post May 16 2016, 11:41 AM
Post#2


Access Wiki and Forums Moderator
Posts: 71,202
Joined: 19-June 07
From: SunnySandyEggo


You may to use a different approach. For example, create an Access Application object in your script to open the database with a password. Just my 2 cents...
Go to the top of the page
 
Penguin629
post May 16 2016, 11:45 AM
Post#3



Posts: 11
Joined: 19-August 15



I have 2 different versions of access. I need to open it in Access 2010.
Go to the top of the page
 
theDBguy
post May 16 2016, 12:27 PM
Post#4


Access Wiki and Forums Moderator
Posts: 71,202
Joined: 19-June 07
From: SunnySandyEggo


When you create an Access Application object, I think you can tell it which version to open. For example: CreateObject("Access.Application.14")
Go to the top of the page
 
theDBguy
post May 16 2016, 12:29 PM
Post#5


Access Wiki and Forums Moderator
Posts: 71,202
Joined: 19-June 07
From: SunnySandyEggo


Pardon me, according to this website, it may not be that simple. Sorry...
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    11th December 2017 - 07:57 PM