• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1136
  • Last Modified:

How to add ActiveX Controls in Access2007 Form ?

I want to add ActiveX Controls " Microsoft office document image viewer control " to my Access2007 form, when I added I tried to run in form view but nothing happen. Do I need to write code to make this control work. because I have field for attachment and all my attachments are *.Tiff format so I want view my attachment withen the form itself.
0
Ahmad Al Raeesi
Asked:
Ahmad Al Raeesi
  • 3
  • 2
1 Solution
 
thenelsonCommented:
<Do I need to write code to make this control work. >
This will show you how: http://www.thenelson.name/, Linked Images Demo  
0
 
Ahmad Al RaeesiAuthor Commented:
Thanks, but I am not that good in coding, Do you have another simple solution.
0
 
thenelsonCommented:
Unfortunately, to use the image control, you have to use VBA.  This is the code to load the image:

On Error Resume Next
Me.ImageControlName.Picture = "Path & Name of file in String format"
If Err.Number = 2220 Then Me.ptImage.Picture = ""       'If file not found fill nothing in the object frame
On Error GoTo 0

Placing that code in the On Current Event will load the picture each time the record changes.
0
 
Ahmad Al RaeesiAuthor Commented:
This code actually work fine but it's not support Tiff format as I said in my Question.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now