View Single Post
  #4  
Old January 22nd, 2009, 06:32 PM posted to microsoft.public.access.gettingstarted
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default How do i attache scanned documents to the database. eg. Memos

To display an image on a form you can add include a text field in its
underlying table in which the path to the image file s stored. On the form
include an Image control and set its Picture property to the path in the
form's Current event procedure like so:

If Not IsNull(Me.ImagePath) Then
Me.Image1.Visible = True
Me.Image1.Picture = Me.ImagePath
Else
Me.Image1.Visible = False
End If

where ImagePath is the name of the field in the table and Image1 is the name
of the image control. You can do similarly in a report by putting the same
code in the report's Detail section's print event procedure. A report
differs from a form in one respect, however; while you don't need a control
bound to the ImagePath field on the form, in a report you do need such a
control in the detail section, but you can set its Visible property to False
(No) to hide it.

You'll find a demo of a more complex means of doing this at:


http://community.netscape.com/n/pfx/...apps&tid=23913


In the demo multiple images can be attached to each record and shown on
demand by selecting from a list box. By the sound of it this might suit your
requirements better. I'm not sure how up to date the file in the library is.
I did amend it at some stage in response to a request by somebody so that a
user can select specific images per record for display in the report. If
you'd like the latest version (itself pretty old now!) mail me at:

kenwsheridanatyahoodotcodotuk

Ken Sheridan
Stafford, England

"Panthernet" wrote:

I'd like to attach scanned documents to each record that i create for my
database. I have both pictures and handwritten documents. How do i attach
them to the corresponding record and ensure that the pitures will be visible
in the form as well.