Export a form as .JPG

Posted on 2003-03-03
Medium Priority
Last Modified: 2008-02-01
I can export charts (graphs) using graphchart.export.

Is it possible to export a form as .JPG file.  I have many graphs with additional controls on the form that need to be included in the jpg output.

If possible, please explain how for additional points.


Question by:katzwhite
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

Expert Comment

ID: 8062034
There may be a way through code, but I don't know it.

You could do it manually with the assistance of a graphics program that will save in jpg format. To do this open the form that you want to export, press and hold the Alt key, press the Print Screen key (usually near the Scroll Lock key) open your graphics program and use paste (Ctrl-V) to paste the image, save it as a jpg.

Hope this helps.

LVL 26

Assisted Solution

by:Alan Warren
Alan Warren earned 600 total points
ID: 8062054
As far as I know you can't export and access form as a jpg

but you can copy to clipboard and paste into another app, say photoed.exe

Alt + PrintScreen to copy form when form has focus.

Ctl + V to paste into another app.

LVL 53

Expert Comment

by:Ryan Chong
ID: 8062123
Yes, definitely can be done.

What i will do is put a Imag Control (Picture Box) in the form, make it Visible to False (No), then try use below code to generate the JPG file.

Here is a popular sample that uses the Intel JPG DLL to allow you to save a picturebox's picture out to a JPG file:


Hope this helps
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 53

Expert Comment

by:Ryan Chong
ID: 8062140
And here is an example to capture form image:

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 TheScreen = 0
 Private Const TheForm = 1

Private Sub Command1_Click()
    Dim s As Integer
    s = IIf(Option1(0).Value, TheScreen, TheForm)
    keybd_event vbKeySnapshot, s, 0&, 0& 'Change to TheScreen to make Screen Capture
    Picture1.Picture = Clipboard.GetData(vbCFBitmap)
    'Printer.PaintPicture Clipboard.GetData(vbCFBitmap), 0, 0
End Sub

Private Sub Form_Load()
    Option1(0).Caption = "Print Screen"
    Option1(1).Caption = "Print Form"
    Option1(0).Value = True
    Command1.Caption = "Print Now"
    Command2.Caption = "Print Form"
End Sub
LVL 26

Assisted Solution

by:Alan Warren
Alan Warren earned 600 total points
ID: 8062233

What reference are you using to expose the clipboard

'err.description = "method or data member not found"

Picture1.Picture = Clipboard.GetData(vbCFBitmap)
'err.description = "Variable not defined"

vested interest


LVL 53

Accepted Solution

Ryan Chong earned 300 total points
ID: 8062295
Seems to be not working in VBA... the code above is applied in VB, sorry. Will find another solution..

Author Comment

ID: 8170292
We can use a graphics problem as long as it can be started with a control button that will activate a script that will pass the stored image name and execute automatically with no user intervention.

Since we can print the form, an ideal solution would be to convert the printed image to jpg.  Kinda like creating a pdf file by printing to a pdf printer.

Any suggesitons?


LVL 12

Expert Comment

ID: 8784146
Hi katzwhite,
This question has been abandoned and needs to be finalized (96 days since last comment).

   You can accept an answer, split the points, or get a refund. Go to
   http://www.cityofangels.com/Experts/Closing.htm for information and options.


EE Cleanup Volunteer for Microsoft Access

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 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