473,756 Members | 8,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"access is denied" error with MODI Viewer Control in Access 2007

69 New Member
Hi everyone. I have a form in my Access 2007 database with a Microsoft Office Document Imaging Viewer Control 12.0 object on it. The object is named "GRAPHIC_md v". When the form opens I want to take the path and filename information passed to the form (via the form's opening arguements) and display the file in the MODI Viewer Control object. I'm using the following code to do this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2. Dim miDOC As MODI.Document
  3. Dim miDOC_VIEW As MODI.MiDocView
  4.  
  5.         'Set a reference to the MDV object on the form
  6.         Set miDOC_VIEW = GRAPHIC_mdv.Object
  7.  
  8.         'Set a reference to a new MODI document object
  9.         Set miDOC = New MODI.Document
  10.  
  11.         'Open the file in the MODI document object
  12.         miDOC.Create Me.OpenArgs
  13.  
  14.         'Associate the MODI document to the MODI viewer control
  15.         miDOC_VIEW.Document = DOC
  16.  
  17. End Sub
All of the sample code I've seen uses this simple approach to displaying a image file in a MODI Viewer Control. My problem is the line:

Expand|Select|Wrap|Line Numbers
  1.         miDOC.Create Me.OpenArgs
When the program execution gets to this line I get an "access is denied" error. Anyone know what this is about?

I've tested the path and filename being passed to the form and they are correct (i.e. it points to a valid TIF file that I can open with the MODI program that comes with Office 2007).

Any thoughts are greately appreciated.

Regards,
sphinney
Oct 8 '08 #1
2 4823
missinglinq
3,532 Recognized Expert Specialist
Never used this control, or even knew that it existed, but my first thoughts would be that the error message "access is denied" means exactly what it says! Access error messages are not known for accurately reflecting the problem, but sometimes they actually do! Does the user have access/network rights to the folder holding the image file?

Linq ;0)>
Oct 8 '08 #2
sphinney
69 New Member
Never used this control, or even knew that it existed, but my first thoughts would be that the error message "access is denied" means exactly what it says! Access error messages are not known for accurately reflecting the problem, but sometimes they actually do! Does the user have access/network rights to the folder holding the image file?

Linq ;0)>
Interesting. The user has read but not write permissions for the files I was testing with. When I re-tested the code using a file I knew the user had write permission to, the code worked. So using the "Create" method must want to open the file with write permissions, and when the user doesn't have write permissions, it throughs a "access is denied" error.

So, as you suspected, "access is denied" really means access is denied. Brilliant!

Thanks for helping me see the obvious. I'm feeling pretty silly.

By the way, the Microsoft Office Document Imaging is tool (and ActiveX component) that comes with every copy of Office (although you can choose not to install it if you wish). It has more zoom, pan, save-as and copy functionality that the Picture control that comes with Access. There is some information about this component on MSDN, but it's very limited.

Thanks,
sphinney
Oct 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6038
by: Riyad | last post by:
Hi all, I have trouble instantiating a COM object from an ASP file: Server.CreateObject raises "Access Denied" error. The COM object is a VB.Net assembly registered for COM Interop. It can be invoked from a standalone VBScript file without problems. I tried monitoring file system for possible access violations but unsuccessfully. The DLLs are located in a
1
17339
by: Ravi | last post by:
I am posting this message after reading all the previous posts with the above subject. I have a SQL2K named instance running on a Windows 2K machine under Local system Account and it uses SQL Server authentication. This Server is on a domain by itself. Let us call this M1. I am connecting to this server from an XP machine usinng Enterprise Manager. Let us call this machine M2. Since the client and server are on differentt domains when I...
1
7041
by: Winterminute | last post by:
If I try to make any changes to the ASP.NET Portal Starter kit it fails with an access denied error. This was working when I left last week and is failing today. I don't remember changing anything, but I guess something had to be changed. I have checked NTFS permissions and the ASPNET account has full control on the parent directory of that XML file and on the file itself. I have also checked in IIS, and the Virtual Directory has...
0
1456
by: Brian Call | last post by:
We have a customer that is getting an "Access is denied" (to a specific dll in the application's bin directory) error on XP when trying to run an ASP.NET application. All the posts and KB articles I have read (such as http://support.microsoft.com/default.aspx?scid=kb;en-us;329065) say that this happens when indexing service is running. But in this case we have verified that it is not running. I have also looked at file permissions and do...
2
2751
by: Loane Sharp | last post by:
Hi there I'm using VB.NET and Office Web Components to access a SQL Server 2005 Express database and draw pictures on the fly in my ASP.NET application. Using .ExportPicture to write the GIF/JPEG/PNG image to disk and then load it into the page using the <IMG /> tag is probably not the tidiest or most secure way of doing this, but it is the easiest and allows the greatest flexibility in terms of positioning. (It also seems to be the most...
1
5142
by: srivatsans101 | last post by:
Hi, I'm trying to access the IFrame contents on a HTML page as frames.document But in IE, I'm getting Access Denied Error Message. I tried to add the IFrame's Src WebSite (a local/intranet hosted dynamic HTML page) to Trusted Sites list in IE Options.
6
4588
by: =?Utf-8?B?UGF1bA==?= | last post by:
I am getting an "Access to the path "xxxx" is denied error. I believe is because the file that I am writing to programatically is being read/written to by another end user. These files have the same file name and must have the same file name. I am essentially overwrite an existing file that is being used by another user. My question: Is there some method or property in the IO class that will allow me to CHECK to see if it is safe to...
18
2563
by: Jeff Bigham | last post by:
Hi, I'm getting an "Access is denied" error in IE when I try to focus an input box with node.focus() My understanding is that should only happen when the domains are different of the Javascript and the element that its trying to focus. It might be cross-frame, but everything comes from the same domain. The oddest part about this is that even though I get the "Access is
2
5384
by: sbasavar | last post by:
Hi All, In my excel programming, I am using XML http object (MSXML2.XMLHTTP.3.0). Using this object when I try to send a request application throws an "Access is Denied" error. Strange thing here is that the request absolutely works fine on some systems with Excel 2003 and doesn't throw any error; but same patch of code throws an error with Excel 2000, 2002, 2007 and even on some of 2003 systems. Following is sample of code I am...
0
9384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9212
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9973
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8645
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5247
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.