Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Print screen of an Access Form

Posted on 2011-03-24
5
Medium Priority
?
2,257 Views
Last Modified: 2012-08-14
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?
0
Comment
Question by:marku24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 44

Expert Comment

by:GRayL
ID: 35211092
use Alt+PrintScreen

then copy to something like WordPad, save it, and use it from there.
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 800 total points
ID: 35211267
You're referring to a "screen capture"? Where you take a screenshot of whatever is on the screen? If so, see this page:

http://word.mvps.org/faqs/macrosvba/PrtSc.htm

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.
0
 
LVL 5

Assisted Solution

by:DoveTails
DoveTails earned 200 total points
ID: 35211820
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_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
 keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
End Sub
'=============================================

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

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.
0
 
LVL 44

Expert Comment

by:GRayL
ID: 35212163
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.
0
 
LVL 85
ID: 35212376
Actually, the code supplied by DoveTails is nearly identical to the code at the link I provided.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

610 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