Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing or linking photograghs

Status
Not open for further replies.

NewTeki

Technical User
Jul 16, 2003
22
US
We ahve an access application that monitors deliveries. Whenever there is a problem, a photo is taken of the merchandise. Is there a way to import photo into the access application, and subsequently attach it to an email or print it right on a report? Thanks for any help.
 
NewTeki,

You can create an OLE field in your table and "store" the image. But this will could lead to database "bloat". It is better to store a link to the image in your table.

Code:
... 
' Field "graphic" comes from the table an example would be wrench.tif
' imagepath is a standard path for all images (for this app).
' ImageAW is the name of my image control
'
' NOTE: you could store the entire path and name in the graphic field (c:\Inventory\Images\wrench.tif)
...

' Default turn off image
   Forms!frmAssets.Controls!ImageAW.Visible = False
 nlCheck = IsNull(Graphic)     ' Test for a valid file name
If nlCheck = 0 Then
 Forms!frmAssets.Controls!ImageAW.Visible = True
  qualname = ImagePath & Graphic     'Graphic field may contain blanks
  On Error GoTo Errorg
 fileAttr = GetAttr(qualname)  ' Valid DOS file name?
  Me!ImageAW.Picture = qualname
End If
Exit Sub

Errorg:
    ' Invalid dos file name set to default
 Forms!frmAssets.Controls!ImageAW.Visible = False
    Exit Sub

Search this forum...

I hope this helps.

Good Luck...

 
HiTechUser,

Thanks for the reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top