Solved

Access apd will not allow forms to be deleted or renamed

Posted on 2015-02-18
5
105 Views
Last Modified: 2016-02-11
I've developed an Access .adp application (Access 2010/SQL 2008R2) which works fine - but if I try to rename a form or delete a form the sub menu that opens when you right click on the form has the Delete and Rename option greyed out.

I created a blank database and imported all the forms/reports/macros/modules successfully from the Access.adp front end database and connected the front end database to the back end SQL database but sill no joy with being able to rename/delete forms.

I have opened all tables/ forms - just to make sure there was no problems - everything opened as expected and I even recompiled the front end database - still no joy.

I have several other Access.adp databases running in the same PC/Server and all allow me to rename/delete forms/reports etc.

Is there some system setting that I should set on/off?

Many thank for you assistance
0
Comment
Question by:Adlerm
  • 2
  • 2
5 Comments
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 167 total points
ID: 40618838
Try to Decompile the application. To do that, create a Shortcut with this as the Target:

"full path to msaccess.exe" "full path to your db" /decompile

Do that, then Compact the database. Next, open the VBA Editor and Click Debug-Compile. Fix any errors, and continue doing that until the menu item is disabled. Now compact again.
0
 
LVL 24

Assisted Solution

by:Bitsqueezer
Bitsqueezer earned 333 total points
ID: 40622074
Hi,

I made a module which exports any object in an ADP into a new ADP including the Access properties and VBA references. It uses Application.LoadFromText and Application.SaveAsText to export and import which makes sure that the result are decompiled text objects so any "binary trash" is removed in the new database file. I use that from time to time to refresh my ADPs during development and helped me often.

The module can be found here:
http://www.experts-exchange.com/Software/Microsoft_Applications/Q_27795995.html#a38201769

Cheers,

Christian
0
 

Author Comment

by:Adlerm
ID: 40622517
Hi Scott / Christian

Scott I tried you suggestion but it did not fix my problem.
Christian I' still to test you approach.

As a background note I should have said the frontend Access.adp database that I'm having trouble with was originally developed under Access 2007 and transported across to Access 2010.  The other Access.adp applications I referred to were developed only under Access 2010.

To bring you up to date I think I have identified the cause but I don't know why it is causing it.

I created a new frontend Access.adp (2010) database linked to the backend SQL Server database and then imported all the object groups (forms/reports/macro/modules - in that order) from the old frontend database.

I checked the form's submenu after importing each object group, closed the application and then reopened it again checking the forms submenu. Rename/Delete options on the form's submenu were active on all occasions, however, after importing the Modules object group, closing the application and the reopening it I started to get compile error messages.

I then started to check various references (e.g. Visual Basic For Applications, Microsoft Access 14.0 Object Library etc.). Again everything was OK - with respect to the forms' submenu Rename/Delete options - until I checked the Microsoft DAO 3.6 Object Library.

After checking the Microsoft DAO 3.6 Object Library reference I recompiled the program (this got rid of the compile error I was encountering ) checked the forms' submenu (Rename/Delete options still active) and closed the application.

Unfortunately on reopening the application - at this stage - The form's submenu Rename/Delete options were no longer active (greyed out).

I carried out a number of other tests - to verify if the Microsoft DAO 3.6 Object Library reference was the culprit - by removing it from the reference list and then adding it back into the reference list. Each time the reference was removed from the reference list the form's submenu Rename/Delete options were active after reopening the application. Conversely, the form's submenu Rename/Delete options were not active if the Microsoft DAO 3.6 Object Library reference was included in the reference list.

Hope this may shed some light on the problem.

Many thank for your assistance

Michael Adler
0
 
LVL 84
ID: 40622832
DAO 3.6 generally is not used with 2007 and above. Instead, you use the "Office xx Access Database Engine Object Library", as you've indicated.
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 333 total points
ID: 40623079
Hi Michael,

as Scott said, the DAO library was exchanged beginning with A2007, because the database engine was exchanged from JET to ACE. But if you do not explicitly need DAO for any reason in your frontend you can completely remove it as an ADP normally don't need DAO, only ADO (which also should be version 6.x depending on the target Windows version you want to use - beginning with Windows Vista it should be 6.x, in case of Windows XP it should be version 2.8, and the frontend should only compiled on a Windows XP machine then as the 2.8 from >=Vista is not compatible with the 2.8 from XP).

As you can also use ADO to open an ACCDB/MDB (if you want to do that in your ADP frontend) you should rewrite DAO code to ADO code in your frontend and remove the DAO reference completely from your frontend.

Cheers,

Christian
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now