Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Disable Design View
David Clement 
      
3 years ago
Hello,
I am wondering is there a way when printing barcodes using the method as described by Richard(which worked out great), to ONLY show the print preview when ready to print your label(s) and not show design view. If there is a way, I can't seen to find it.

I tried to do a snip it, but for some reason the save feature is not working right now. I have an OLD work computer.
The dialog box has these to choose from:
Save
Close
Close All
Report View
Design View
Print Preview
I would like to have only Print Preview show. I don't want others to make changes to the report.
Thank you.
Scott Axton  @Reply  
        
3 years ago
What is the way you are calling the print job now?  
In a button?
Code for the button.
Kevin Robertson  @Reply  
          
3 years ago
First you need to add a reference to Microsoft Access 16.0 Object Library
In the VBA Editor: Tools -- References

Add this code, or similar, to a Global Module and call it in the Open even of your start up form (you only need to call it once).

Public Sub CreateReportShortcutMenu()

    Dim cmbRightClick As Office.CommandBar
    Dim cmbControl As Office.CommandBarControl

   ' Create the shortcut menu.
    Set cmbRightClick = CommandBars.Add("cmdReportRightClick", msoBarPopup, False, True)

    With cmbRightClick
        
        ' Add the Print command.
        Set cmbControl = .Controls.Add(msoControlButton, 2521, , , True)
        ' Change the caption displayed for the control.
        cmbControl.Caption = "Print"

        ' Add the Close command.
        Set cmbControl = .Controls.Add(msoControlButton, 923, , , True)
        ' Start a new group.
        cmbControl.BeginGroup = True
        ' Change the caption displayed for the control.
        cmbControl.Caption = "Close Report"
    End With
    
    Set cmbControl = Nothing
    Set cmbRightClick = Nothing
    
End Sub


In the property sheet of your Report add the name of the Shortcut Menu (created with the code above) to the Shortcut Menu Bar property (on the Other tab). In the case of the above code the name is cmdReportRightClick

Close your database and reopen it so your start up form runs and creates the Shortcut Menu.
See this video if you don't know how to set up a Startup Form: Startup Form

The screenshot below shows the custom Shortcut Menu.
Kevin Robertson  @Reply  
          
3 years ago

David Clement OP  @Reply  
      
3 years ago
In the screenshot you can see the Dialog Box the choices. I don't want someone to accidently select Design View and make changes.
Kevin Robertson  @Reply  
          
3 years ago
I thought you wanted a custom shortcut menu. Is this not the case?
My screenshot clearly shows only two options - Print and Close Report.

If you create an ACCDE your end users won't be able to get to Design View and the shortcut menu won't matter too much.
Kevin Yip  @Reply  
     
3 years ago
You may have to create a ACCDE file for your users.  It is an executable-only file in which the user can't get into any design view of anything.
David Clement OP  @Reply  
      
3 years ago

Richard Rost  @Reply  
          
3 years ago
Kevin Robertson's code is very elegant and a great solution however I'm going to have to agree to just make an ACCDE file and the problem goes away. Your user can't make design changes. Then just give your user a button that opens the report in Print Preview and they'll get a Print button.

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

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 6:16:23 AM. PLT: 0s