Print screen of an Access Form

I would like to "print screen" an Access form and print it.  I don't want to "print screen" the entire screen but would like to designate the coordinates of the screen that makes up the form.  My objective is to print exactly what I see on the screen.  Is it possible to do through VBA?
Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
You're referring to a "screen capture"? Where you take a screenshot of whatever is on the screen? If so, see this page:

It's listed as Word, but it will work in Access.

If you're trying to print the data that's in that form, then you should build a Report and print that.
use Alt+PrintScreen

then copy to something like WordPad, save it, and use it from there.
DoveTailsConnect With a Mentor Commented:
Something I saved from a web site that may be useful.........
Insert a new module and paste the following to create a "ScreenCapture" procedure:
Option Compare Database
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
 bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Const KEYEVENTF_KEYUP = &H2
Private Const VK_SNAPSHOT = &H2C
Private Const VK_MENU = &H12

Sub ScreenCapture()
 keybd_event VK_MENU, 0, 0, 0
 keybd_event VK_SNAPSHOT, 0, 0, 0
 keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
End Sub

Add a command button to your form and on the click event type:

This will paste your active window to your clip board (you can paste into Word to see what you have)
I can only get your active window to the clipboard ... not sure how to print from there.

Hope that helps.
Egg on my face:  I forgot about this a long time ago.  When in the Desktop, Alt+PrintScreen will capture the window with the focus - PrintScreen will capture the whole desktop.  For some reason, strange or otherwise, when in Access, they both do the same thing - the whole desktop.  Looks like DoveTails has the solution.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Actually, the code supplied by DoveTails is nearly identical to the code at the link I provided.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.