Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Developer > D44 > D44 Lessons < D43 Lessons | D45 Lessons >
Back to Access Developer 44 Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Compact Repair not Accessible
Ester Grande 
     
20 months ago
Hi all, in my db I Have disallowed in the access options the shortcut menu (rightclick mouse). I have created an admin form where there are two buttons and by clicking them I allow or disallow the use of the shortcut menu so that as admin I can use it

This is the code to allow and to disallow it

'Allow
Private Sub ShowMouseBtn_Click()
    CurrentDb.Properties("AllowShortCutMenus") = True  
    CurrentDb.Properties("AllowFullMenus") = True
  End Sub

Same code with false to disallow it

Now, in order to take the change the db needs to be restarted. I tought to use the compact and repair button, but if the menu is disallowed, in the ribbon I can't reach the compact and repair button. I tried to make a custom ribbon, adding the compact and repair button , but even though I see the button, that doesn't do the action. (here is the xml)

Basically if the shortcut menu is disallowed there is no way I can restart the db unless I close it and reopen it manually which I wanted to avoid.  How to solve it?

Kevin Yip  @Reply  
     
20 months ago
It isn't so bad to manually close and restart an application, is it?  You have to do that with almost all applications anyway.  I can't think of an application that has an "auto close and restart" feature.  If you have to have that feature in Access, you likely need to create and run an external script (batch file, VBScript, etc.) that detects the closure of Access (.laccdb disappearing) and reopen Access.  It's a cumbersome way to save just a couple of mouse clicks to reopen Access yourself.
Ester Grande OP  @Reply  
     
20 months ago
Thanks Kevin, I just do it manually
Richard Rost  @Reply  
          
20 months ago
Yeah, I agree with Kevin. Then, it's not actually that much work to just close the database and reopen it manually. But if you wanted to do it this way, you would have to Shell out to something else that would then reopen your Access database. That's how I do it with my Access Updater. It opens another database that waits for the first database to close, performs the update, and then it relaunches it and closes itself. You don't need something that complex; you can do it with a simple batch file or PowerShell script.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 44 Lessons.
 

Next Unseen

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 12/9/2025 7:35:01 PM. PLT: 1s