473,882 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Decompile an Access Application Or How to do a Full Fresh Compile

2,322 Recognized Expert Moderator Top Contributor

I have always found Access ability to do handle code-changes while in break mode quite astounding. However there is a very real risk of corrupt code being stored in your database when you edit code while in break mode. Access doesn't really clean up the old bits of compiled code, and sometimes it seems to get confused about which bit of pre-compiled code it should use.

If you suddenly find that your application suddenly and for no good reason starts to error on code that was previously working without a hitch, there is a good chance that a bit of spring cleaning will fix it.

How to spring clean your application
Access has a command line option called /decompile. This will toss away all your compiled code (not the source code, don't worry, simply the precompiled version of the code). This is similar to the Compact And Repair removing cached versions of tables and queries, only this does it for form modules and stand-alone modules.
  1. First ensure that all access applications are closed.
  2. Ensure that you have done a backup of your application.
    Click Start->Run and then type:
    1. Access 2010: C:\Program Files\Microsoft Office\Office14 \MSACCESS.EXE /decompile
      Note that the path will vary depending on your OS and your version of access
  3. From the access window, open up your application while holding down shift.
  4. Alt-F11, then choose from the menu: Debug->Compile (This will compile all modules)
  5. You may want to finish off with a Compact and Repair, though I don't really know if its necesarry at this point.
  6. Close and reoopen access to turn off the decompile option.

Your application should hopefully now be ready to run "normally" again.
Aug 30 '12 #1
7 32987
32,584 Recognized Expert Moderator MVP
Simple, but can be very important when a database is causing trouble in a project. Thanks for this Smiley :-)
Aug 31 '12 #2
24 New Member
Yes, thank you for this! Very easy to understand even as a novice. Can this process do any harm to the database? I understand that I should make a backup, but what are the risks involved?

I'm considering using this method, but I'm not sure what I should be testing to ensure nothing went wrong.

Thanks again.
Aug 31 '12 #3
2,322 Recognized Expert Moderator Top Contributor
Your welcome

Your welcome
To the best of my knowledge the decompile is harmless.

The compact and repair has been known to sometimes cause a database to be left in a state where it can no longer be opened, allthough I can not recall if it has ever happened to me.
Aug 31 '12 #4
3,653 Recognized Expert Moderator Specialist

I have had the Compact and Repair hang on me before, and one time, when I ran it, it STRIPPED all off the code out of every module!! :-o Fortunately I had a backup....

However, this functiondoes appear to do different things to the database. Do you find that this also reduces the size of the final product? Or is the size difference insignificant?
Aug 31 '12 #5
2,322 Recognized Expert Moderator Top Contributor
I suppose it ought to reduce the size, but whether its significant or not I haven't really looked at.
Aug 31 '12 #6
32,584 Recognized Expert Moderator MVP
It should only make a difference if Access had previously managed to get something wrong. In that case, it would change the size to what it should have been had there been no error in the first place. How much of a difference that would make, if any, is the length of a piece of string. For those non-English out there that means it can be any length.
Sep 1 '12 #7
32,584 Recognized Expert Moderator MVP
This saved my life today, with a client that had a corrupted BE.

System in use continuously all through the working day and quite a lot outside of that too. I managed to get them working again within a relatively short time using this technique. Even then - most of the delay was getting them all to come out properly.

Long story short - this was a life-saver.
Aug 15 '14 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

by: ari | last post by:
Hey all, I was just wondering if there is a way for me to open my access application in a vb.net application and when that access application is open, to close my vb.net application? thanks in advance, ari
by: lauren quantrell | last post by:
I have an Access 2000 application and I am using ShowWindow to hide the MS Access application window. Works fine as long as there is a popup form open all the time. The problem is when I want to open a report. Reports seem to only be able to to open within the Access Window itself (or am I missing something?) To work around this I use a scheme that opens the report maximized, then unhides and maximizes the MS Access window using ...
by: John Baker | last post by:
Hi: I have a situation where I need to programmatically open an Access application from an Access applications on the same system. Eventually the second application will close and return control to the first one. They share the same data base! For the life of me I cant make that happen. Does anyone have any suggestions? If you do have suggestions, the more precise you can be regarding code or functions, the more helpful it would be.
by: ad | last post by:
I have used Data Application Access Block2 in my web application. Now I download the Library Data Access Application Block. and read the document. May be I am stupid, I can't migrate it to Enterprise Library Data Access Application Block. The code below is the Data Application Access Block 2, How can I modified them? //---------------using Data Application Access Block
by: Grant | last post by:
Hi, I'm trying to setup a web server to host asp.net 1.1... but keep getting the following error message: Hopefully someone can give me some ideas on what I may need to do. Thanks in advance - Grant. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
by: dennist685 | last post by:
I created a web project named 'Access' in C:\Inetpub\wwwroot\Access and dropped an .mdb there. I dragged a DetailView to the form, configured it to show two fields of a table, and got AccessDataSource1. The test query worked. The .mdb was not open in Access, nor was it being used anywhere else. Yet when I pressed Cntl+F5 I got the following error:
by: Gil | last post by:
can you set focus to the current access application through vba? lets say i tell access to open another application and that new application gains the focus and causes access to loose the focus. can access reset the focus back to its current access application after loosing its focus? docmd.select object or me.setfocus doesnt seem to work. what it does it set the highlet on a textbox within the form but the form is still not selected....
by: Oldie | last post by:
I have built an MS Access Application under MS Office XP (but I also own MS Office 2000). I have split the application in the pure database tables and all the queries, forms, reports and macro's. Now i want to use this application for different foundations in the Netherlands but I want to secure my application so no one can change it, copy it or steal it from me. I always thought there was a kind of conversion tool that would translate...
by: Steve | last post by:
I have zero experience with ODBC. If I have an Access frontend connected to a SQL Database using ODBC, are the tables connected like a frontend/backend Access database where the the tables you see in the frontend are only "copies" of the tables in the backend? Or ar the tables "real" tables connected to the SQL tables in some manner? If the latter, can an Access table have more fields than the SQL table it is linked to? The reason for my...
by: WackoZacho | last post by:
I've tried searching on Google and for other questions similar to mine, but all I get are results on how to use the LostFocus event or Deactivate, etc., but I'm under the impression each of these applies to controls on a form, or the actual form itself. What I need is a way to determine when my access database looses the focus entirely to another program in Windows, such as if I click on one of my access forms, MSAccess will have the focus. If I...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.