When I deploy a compiled database, I often rename the file extension to ACCDR to force Access into Runtime Mode. I use the following code to check if the database is running in Runtime Mode and exit the application if it is not.
However, I could not find an equivalent SysCmd constant to check for ACCDE, and I am not sure if there is a property for it as well. So, I came up with the following function, which seems to do the job.
Public Function IsACCDE() As Boolean On Error GoTo errHandler Application.VBE.CodePanes(1).Show IsACCDE = False errExit: Exit Function errHandler: IsACCDE = True Resume errExit End Function
I am not sure if it is the best way to perform the ACCDE check, but I just thought I would share it and see if you can tell me if there is a better way. Thank you!