Just a small question regarding the MS Access runtime version. I have an accdb file and I renamed it to accdr and tried to execute it in my runtime version but unfortunately I cannot open the file because I get a security authentication warning stating that the file I tried to open contains some unauthenticated content.
I've already tried the standard ways of conversion of accdb to accdr. I know the content is valid (created by me) so can anyone help shed some light on this problem.
First of all re-naming a file does not change what you have. I mean I cannot re-name a word document into an AutoCAD document and out of the blue you now have an auto cad application. So the “act” of renaming something does not change what is inside of the file.
So to state that renaming an accDB to accDR is some kind of “conversion” and you attempted such conversions is not how computers work.
Next you don’t state if you are running the accDR on your development machine or not. And even worse is what occurs when you simply copy the accDB to that machine and double click on it?
So keep in mind a few things:
If you install the runtime on a machine, then you can simply copy any mdb, mde, accDB, accDE and yes even an accDR and then simply double click on that file to launch/run that application.
THERE IS THUS ZERO REQUIREMENT to re-name the file as an accDR and doing so yields you NOTHING different then just having copied the accDB to that machine with the runtime and simply double clicking on that accDB.
So NO NEED exists to re-name the file as an accDR
However the error message about un-athenciated content is a different issue and NOT related to the accDR issue at all. You receive that error if you simply copy any access file to that machine and double click on it. So the solution to this issue is to ensure that the folder/location of the accDB file is in a trusted folder.
Last but not least:
You REALLY (but REALLY REALLY REALLY) want to compile your accDB into an accDE. This should be done for any and all your applications before using and running them. More important is any un-handled errors when using runtime will SHUT DOWN your application if it is an accDB, but NOT if you use an accDE.
So re-naming the file to accDR does nothing, yields you nothing and is NOT required. About the only advantage of the accDR is its use for testing on your development machine since using that file extension will have access “emulate” or “mimic” the runtime environment. However since the target machine is runtime then this re-naming thus is not required and thus achieves ZERO effects on the results.
So you need to ensure that the database runs in a trusted location.
This explains how to do this:
http://office.microsoft.com/en-gb/access-help/decide-whether-to-trust-a-database-HA010341635.aspx
So you should in theory see/receive the security warning and be able to “enable content”.
You can also consider adding trusted locations to the registry, and perhaps even supply an exported “registry” file that can be clicked on the target computer to create that trusted folder.
So as a good general recommendation you need to FIRST compile your application to an accDE. The next step of re-naming to accDR is OPTIONAL and NOT required and DOES NOT change the application nor does it achieve anything of use when using the runtime.
Related
I have an Access, 2007 – 2016, accdb database on my Toshiba Satellite Pro running Windows 7 32 bit. I am using MS Office 365.
The database that opens at its home page, but any attempt to open a table, form or module brings up this message:
“The database cannot be opened because the VBA project contained in it cannot be read…”
I have 2 backups of this database, but they do the same thing.
I have read several posts on the internet that indicate that the problem can be solved by decompiling the database.
I have tried the VBS Script solution contained in:
How does one decompile and recompile a database application?
However, it does not get to decompile as the same message displays when the .vbs file opens the database.
I have read some other posts that indicate a problem with a VBA7 file, but these refer to Access 2010, so I do not know if they also apply to me. I have VBA7.1 by the way.
Attempts to decompile through the Command Prompt has its own problems that seem to be associated with file names with spaces.
So, I’m stuck. Any help would be much appreciated
I ran into this same error at work, Have you tried shift-clicking and opening? I know that seems obvious, What I did, was I got the DB open in safe mode, and opened up a module in the vba editor, and tried to fight the problematic code, if anything you could delete all your modules after copying them into a notepad.
I also right clicked and restored previous versions from windows, I am not sure if you have tried this when you say you have to back ups, but i was unaware of this fix and i luckily had a version from last week that fixed my issue.
MS Access 2010 on Windows 7 Pro x64
Right-click on a cell in a table (Data Type = OLE Object)
Click on Insert Object...
Select Create from File
Click Browse to find .bmp file (844KB)
Click OK
Receive the following error:
The operation on the OLE object failed. The OLE server may not be registered. To register the OLE server, reinstall it.
Does anyone know how to fix this issue? I've tried running Access in compatibility mode and making the database a trusted source. I am not running Norton Antivirus, which some posts say might be the problem.
#Andre and #Raju have already answered briefly in the comments, but I'm posting a proper answer for the sake of tidyness:
OLE Objects are a bit tricky, but chances are you are missing the OLE Automation Server for the file type, which in this case is - a photo editor (like Paint or Microsoft Photo Editor).
Generally I found 2 solutions you might try:
If you're coming from an older version (which is unlikely nowadays, but still), according to this Microsoft Photo Editor is removed when you install Office 2010.
If that's the case, see https://support.microsoft.com/en-us/kb/817095 on how to reinstall Microsoft Photo Editor,
Otherwise, try to restore Paint as the default application used by Access. See here https://support.microsoft.com/en-us/kb/177587 how. (Basically just remove and reinstall Paint. Instructions in the link are for an older Windows version, but I guess most steps are similar).
EDIT: note #Andre comment:
In newer Windows versions, setting File associations is not in
Explorer options, but in Control Panel Home -> Default Programs.
If you don't mind losing the existing data in your image column (or table is still empty), you can switch from the OLE Object data type to the (newer) Attachment data type.
You also gain the added value of being able to attach multiple images.
You can read more on Attachment data type here - https://support.office.com/en-us/article/Attach-files-and-graphics-to-the-records-in-your-database-d40a09ad-a753-4a14-9161-7f15baad6dbd#bm1
Good luck :)
An Access database with a load of queries, tables, reports and forms with VBA code.
Was used in Access 2010 for ages, then some users upgraded to Office 2013 very recently.
One user had a "problem" on their computer while using the database, which may have resulted in their computer restarting, and now the database seems to have no forms or code visible when opened.
Googling finds reports of similar situations where the forms and code was there but invisible.
Any ideas?
The first thing to attempt is to open the database and choose Compact and Repair. I would then go into the VB Editor, if possible, and choose the Debug menu, Compile. While in the VB Editor, also check Tools, References for any missing references.
If the database is split to a back-end and front-end then just give them a new copy of the front-end. If this doesn't work then I would re-install Office on their computer.
If they have their own copy of the database (it is not split) then give them a new copy.
If they have already entered data that needs to be kept then I would start a new database and import all of the Access objects from the existing database. I have found that re-importing all objects solves most of these issues. You could import just the tables from their copy of the database, but the other objects from another copy.
If re-importing all objects doesn't resolve the issue then a remaining option is use the decompile command-line option:
C:\Program Files\Microsoft Office\Office15\MSACCESS.EXE /decompile
Open Access from this command-line, go into the VB Editor and choose the Debug menu, Compile. Then close, re-open and Compact and Repair.
I'm getting the following error message on some users machines:
The expression On Open you entered as the event property setting produced the following error: There is an invalid use of the . (dot) or ! operator or invalid parentheses.
This error message appears when trying to open the Access database on some peoples' machines using Access 2010 on Windows 7 from a shared location.
Using the same shared network location the database opens fine on Windows XP with Access 2003.
I've checked the registry for the Sandboxmode (2).
The folder location is shared and open for all users.
Looks from the code its not liking the main menu, its complaining about the ! in this form:
strCriteria = [Forms]![MainMenu]![Text22]
I see two issues here:
Compiled .mde (and .accde) files are a lot more "fussy" about different versions of Access than .mdb (and .accdb) files are. This is presumably because .mde files have the source code stripped out of them so Access cannot re-compile things "on the fly" like it can with an .mdb file. Years ago I began stipulating that if the Access application is using an .mde front-end then all users must be running the same version of Access and the .mde must be compiled for that version. Even so, an .mde file will occasionally "act up" but re-building the .mde from the source .mdb will usually fix it. (Subtle changes introduced by Office patches and Service Packs may account for at least some of that.)
If multiple concurrent users are opening the same .mde file from a network folder then you will almost certainly encounter problems. For many years it has been well-known among Access developers that a multi-user Access application must be split into a front-end and a back-end (which you have apparently done), and each user must have their own local copy of the front-end file. Even Microsoft is recommending the practice now (after many years of their being conspicuously silent about the matter).
I am about to release an Access Database application where the UI is used exclusively to interact with the database tables.
Whilst I am interacting with the forms during run time, the Visual Basic Editor appears with a line of code highlighted in debug mode, even when no breakpoints exist and no run time error has occurred.
Has anyone else come across this issue?
I need to ensure that the editor does not appear (under normal operating conditions) while the user is interacting with the application.
Thanks.
Yes, I have had this problem too and it has driven me batty. The quick and dirty way of fixing it is to create blank database and import all of the objects from you old database into the new one.
Are your users working with an .accdb file? (or .mdb, depending on the Access version)
If yes, you should convert it into an .accde/.mde before giving it to your users.
Quote from the link:
Additionally, if the database design needs to be secured to prevent changes, Access databases can be locked/protected (and the source code compiled) by converting the database to a .MDE file. All changes to the VBA project (modules, forms, or reports) need to be made to the original MDB and then reconverted to MDE. In Access 2007 and Access 2010, the ACCDB database is converted to an ACCDE file. Some tools are available for unlocking and "decompiling", although certain elements including original VBA comments and formatting are normally irretrievable.
--> since .accde/.mde files are compiled, it's not possible to view the source code at all.
So the VBA editor can never appear accidentally like you experienced...be it because of a breakpoint, some Stops in the code or some strange breakpoint error like yours.