Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Print Button on a Form
Lee Shastid 
    
2 months ago
I know I can place a button on a form and use the button wizard to print that form. I am trying to put that button on a form using a simple VBA code using the build event option. Can anyone tell me what that code should look like? I have tried some that I have found on the internet but to no avail.
Lee Shastid OP  @Reply  
    
2 months ago
I should have been a little more clear. It is a Form for entering Items the form is ItemF. If i use DoCmd.RunCommand acCmdPrint it prints all of the items, and I only want to print the Item that I am currently on.
Juan Rivera  @Reply  
            
2 months ago
Forms are not ment to be printed, you can recreate the form in a report and make the button print one record or all.  So i have to ask do you really wish to print the form or are you saying saying form in place of report???? let me know us know so we can guid you in the right direction.
Lee Shastid OP  @Reply  
    
2 months ago
I meant report. I want to print one record at a time when needed
Kevin Robertson  @Reply  
          
2 months ago
Lee Shastid OP  @Reply  
    
2 months ago
Thank you to all for the guidance. Much appreciated
Lee Shastid OP  @Reply  
    
2 months ago
Kevin Thank you I watched that and I had forgot all about it. It started clicking when I watched it. The question I have is this, it works but I also get a second page with only the page header on it. I can always just choose to print page 1 and that would be fine, but If I forget its just a waste of ink and paper. Can you offer any suggestions? I have tried working with the page break in various places but it does no good.
Kevin Robertson  @Reply  
          
2 months ago
Check your margins and height /width of the sections.
Lee Shastid OP  @Reply  
    
2 months ago
Ok I will work with it some more. Thank you
Richard Rost  @Reply  
          
2 months ago
Kevin's on the right track. That extra blank page is almost always caused by the report being just a little too wide or tall for the printable area.

Check the report's Width property, the left and right margins in Page Setup, and make sure no controls, lines, or section boundaries extend past the right edge of the report. Also check the Report Header, Page Header, Detail, and Footer section heights. Even a tiny bit of overflow can make Access generate page 2.

The easiest test is to temporarily reduce the report width and the Page Header height slightly, then preview it again. Once it stays on one page, you can adjust things back as needed.
Lee Shastid OP  @Reply  
    
2 months ago
Thank you because I still have not figured it out but I have more ideas on what to do now. I have played with margins to the point I’m dreaming of margins. That helps thank you.
Richard Rost  @Reply  
          
2 months ago
You're welcome. Since you've already played with the margins, leave those alone for the moment and try this as a diagnostic test: in Design View, move or resize every control, line, label, and other object so nothing extends past about the 6-inch mark on the horizontal ruler. Move the right edge of the report to 6 inches.

Then preview the report. If the extra page disappears, you've confirmed it is a horizontal overflow issue. Something may only be extending a tiny bit too far to the right, including a line or a control in the Page Header. Once it prints correctly, move things back out gradually, but leave about a quarter inch of empty space at the right edge for printer differences.
Lee Shastid OP  @Reply  
    
2 months ago
Got it will try it and let you know.

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

Next Unseen

 
 
What's This?

 

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: 9/25/2026 5:56:42 AM. PLT: 1s