Alina B.
Alina B.

Reputation: 1276

How to check if MS Access Fullversion or Viewer

I want to check wheather my database application is running in a fullversion MS Access or only with a viewer / limited MS Access.

The problem is that in a limited version a user can close the last form and then is not able to reopen any form without restart the whole application.

Private Sub Form_Unload(Cancel As Integer)
    If LimitedVersion Then
        Cancel = True
    End If
End Sub

So the question is how to determine LimitedVersion ?

Upvotes: 1

Views: 1878

Answers (1)

Fionnuala
Fionnuala

Reputation: 91356

You can use:

SysCmd(acSysCmdRuntime) 

It will return True for the runtime version.

However, I would never allow the last menu to be closed in an application. The people with a full version can open the application in a different way if they need access to design.

To simulate the runtime environment, you can use the /runtime switch:

For MS Access 2010, it would look something like this, note that the line break is for display purposes.

"C:\Program Files\Microsoft Office\Office14\MSACCESS.EXE"
"z:\docs\demo.accdb" /runtime

Upvotes: 5

Related Questions