Open External Database in Separate Window in Access Runtime Version (1 Viewer)

Pac-Man

Active member
Local time
Today, 20:44
Joined
Apr 14, 2020
Messages
416
Hello,

I was using this code by @isladogs to open external password protected database in separate window. It works fine in full Access but when gives error for those users who are using Access runtime version. The line of code that gives error is Set App = New Access.Application.

How can I fix it OR is there any alternative method to get the purpose done?

Purpose is to open the password encrypted database in separate window without having the user to enter the password.

Best Regards
 

Eugene-LS

Registered User.
Local time
Today, 18:44
Joined
Dec 7, 2018
Messages
481
Try to replace string
Code:
    Dim app As Access.Application, strPath As String
to:
Code:
    Dim app As Object, strPath As String
 

isladogs

MVP / VIP
Local time
Today, 16:44
Joined
Jan 14, 2017
Messages
18,227
@Pac-Man
Eugene's suggestion didn't work for me when I tried it earlier

I don't have a runtime only setup available but simulated runtime using the .accdr prefix for the starter app
It worked fine
Similarly, no issues when I opened the starter app using the /runtime switch.

I tested on the example app I sent to you a few minutes ago by PM following your request
 

Pac-Man

Active member
Local time
Today, 20:44
Joined
Apr 14, 2020
Messages
416
Try to replace string
Code:
    Dim app As Access.Application, strPath As String
to:
Code:
    Dim app As Object, strPath As String
Thanks for reply @Eugene-LS but I couldn't check it yet that's why didn't responded the reply.

@Pac-Man
Eugene's suggestion didn't work for me when I tried it earlier

I don't have a runtime only setup available but simulated runtime using the .accdr prefix for the starter app
It worked fine
Similarly, no issues when I opened the starter app using the /runtime switch.

I tested on the example app I sent to you a few minutes ago by PM following your request
Thanks for reply @isladogs, I have full access installed on the PC and at the same time have runtime 2013 installed on the same PC. Default app is configured in way that accde are opened by runtime while accdb is opened in full Access because I develop accdb whereas most of the users use runtime so because publishing the update, i install it on my PC and since it is accde, it is oped with runtime.

If you're using full acces, then this error won't happen even if you you use accdr or simulate runtime by switch in shortcut. It only happen if the app is opened with runtime version of access (no matter full access version is installed or not).
 

Pac-Man

Active member
Local time
Today, 20:44
Joined
Apr 14, 2020
Messages
416
Try to replace string
Code:
    Dim app As Access.Application, strPath As String
to:
Code:
    Dim app As Object, strPath As String
I check by replacing Access.Application but it didn't work. Still looking for a way to open password protected database in new access window (in runtime version of Access) without entering password manually.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:44
Joined
May 7, 2009
Messages
19,245
i don't think Runtime will allow you to do that.
that is why there are No Ribbon in runtime.
if you succeed, then you Defeated the purpose of runtime.
also runtime is but a subset of the full-version so
not all features can be run on this environment.
 

Users who are viewing this thread

Top Bottom