By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

activex issue - document image viewer - access 2003

P: n/a
Hi,

We recently built a very basic file management system for a client in
Access 2003 (to use with incoming tif scans). In it we used
Microsoft's Document Imaging activex viewer (from Office 2003). The
viewer seems to be a bit 'buggy', in that sometimes if you preview a
tif image using the activex on a form, then goto another form, and then
come back to preview the same image again on the first form, the
preview no longer shows up (just a blank box shows).

Also, I noticed that when you exit completely out of Access 2003, the
msaccess.exe process does not "close" and appears to continue to run
(doesn't show in running applications though). I started to think that
maybe the activex is forcing the access process to "hang" and not
close, when the application closes??

In VBA is there a way to reset an activex control? (like killing a
variable or object)? I did some research, but could not find an
answer, other than to reset the name of the activex object's tif image
to a blank name...

I'm thinking that maybe if we could "kill" the object or unload the
activex object, maybe that would fix both the 'preview bug', and the
issue with the process not completely closing.

Any ideas/suggestions?

Thanks!
Mike

Jul 14 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On 14 Jul 2006 12:18:03 -0700, "mikez" <mi*******@yahoo.comwrote:
>Hi,

We recently built a very basic file management system for a client in
Access 2003 (to use with incoming tif scans). In it we used
Microsoft's Document Imaging activex viewer (from Office 2003). The
viewer seems to be a bit 'buggy', in that sometimes if you preview a
tif image using the activex on a form, then goto another form, and then
come back to preview the same image again on the first form, the
preview no longer shows up (just a blank box shows).

Also, I noticed that when you exit completely out of Access 2003, the
msaccess.exe process does not "close" and appears to continue to run
(doesn't show in running applications though). I started to think that
maybe the activex is forcing the access process to "hang" and not
close, when the application closes??

In VBA is there a way to reset an activex control? (like killing a
variable or object)? I did some research, but could not find an
answer, other than to reset the name of the activex object's tif image
to a blank name...

I'm thinking that maybe if we could "kill" the object or unload the
activex object, maybe that would fix both the 'preview bug', and the
issue with the process not completely closing.

Any ideas/suggestions?

Thanks!
Mike
You could use the standard image control, or Steve Lebans image control, see
http://www.mcse.ms/archive147-2005-5-1640042.html

Jul 15 '06 #2

P: n/a
mikez wrote:
Hi,

We recently built a very basic file management system for a client in
Access 2003 (to use with incoming tif scans). In it we used
Microsoft's Document Imaging activex viewer (from Office 2003). The
viewer seems to be a bit 'buggy', in that sometimes if you preview a
tif image using the activex on a form, then goto another form, and then
come back to preview the same image again on the first form, the
preview no longer shows up (just a blank box shows).

Also, I noticed that when you exit completely out of Access 2003, the
msaccess.exe process does not "close" and appears to continue to run
(doesn't show in running applications though). I started to think that
maybe the activex is forcing the access process to "hang" and not
close, when the application closes??

In VBA is there a way to reset an activex control? (like killing a
variable or object)? I did some research, but could not find an
answer, other than to reset the name of the activex object's tif image
to a blank name...

I'm thinking that maybe if we could "kill" the object or unload the
activex object, maybe that would fix both the 'preview bug', and the
issue with the process not completely closing.

Any ideas/suggestions?

Thanks!
Mike
I use http://www.mvps.org/access/api/api0018.htm to open up registered
files and call it like
Dim var As Variant
var = fHandleFile(strAddress, 3) 'open it up maximized
I've never had a problem with this method.
Jul 15 '06 #3

P: n/a
I use http://www.mvps.org/access/api/api0018.htm to open up registered
files and call it like
Dim var As Variant
var = fHandleFile(strAddress, 3) 'open it up maximized
I've never had a problem with this method.
Thanks for your suggestion...

In fact, for a full preview, I am executing a shell command, per a
user's button click (which works fine). That is not the problem. The
problem is with a small "preview" image that appears on the form, via
the activex object - the first time a user "views" the tif image it
appears, but during the same session, if the user comes back to that
image, it is 'hit' or 'miss' as to whether the tif image will reappear
on the form.

But leaving the tif issue aside for a minute, has anyone ever
experienced Access 2003 "hanging"? In that the program closes, but the
application process still lingers (msaccess.exe). If you open up
Windows Taks Manager, you have to choose to "End Process" for it to
fully close. I have never experienced this before...

Thanks.
Mike

Jul 17 '06 #4

P: n/a
Anybody? Anyone have any further ideas or suggestions?
THanks!
mike

Jul 19 '06 #5

P: n/a
First I have experimented quite a bit with the control and have never had it
cause the current Access session to improperly terminate.

For your redraw issue, you can force a redaw of the control. I believe it
exposes a hWnd property.
Here is a previous post of mine on a similiar issue.

From: Stephen Lebans (NoEm...@please.com)
Subject: Re: Menu Navigation
Newsgroups: comp.databases.ms-access
View: Complete Thread (18 articles) | Original Format
Date: 2002-03-05 17:31:27 PST
This issue has come up many times in the past. What's happening is the
ListBox needs to be repainted but Access seems to have missed the
message. As you pointed out Marshall, resetting the RowSource prop
solves the issue.
There may be occasions, where because of performance considerations, you
do not want to have to reset the RowSource. In these cases we can force
the Access GUI to redraw the ListBox and clear the selection(s).
Here's a post of mine on this subject.
From: Stephen Lebans (NoEm...@please.com)
Subject: Re: How to clear data in a List box?
Newsgroups: microsoft.public.access.forms
View this article only
Date: 2001-09-16 20:43:12 PST
Hi Arvin,
just as a point of interest, I have had trouble with programmatically
clearing selections from a ListBox. It seems sometimes Access will not
redraw the ListBox unless the entire control's window needs to be
redrawn.
For the ListBoxRownumbers project on my site I had to force the
control's window to be redrawn.
http://www.lebans.com/listboxrownumbers.htm
' API Declarations for Sub to clear selections
Private Declare Function InvalidateRect Lib "user32" (ByVal hWnd&,
lpRect As RECTL, ByVal bErase&) As Long
Private Declare Function GetFocus Lib "user32" () As Long
Private Declare Function GetClientRect Lib "user32" (ByVal hWnd&, lpRect
As RECTL) As Long
Private Type RECTL
left As Long
top As Long
right As Long
bottom As Long
End Type
Private Const API_TRUE As Long = 1&
' This sub is required to eliminate a bug/feature
' in Access with ListBoxes that we programmatically select rows in.
' Access does not redraw the control unless we cover up the entire
' control. We fake this by invalidating the entire window.
' Unless you have cached the hWnd the control must have the focus for
this
' to work.
Public Sub ClearSelections(Optional hWnd As Long)
Dim rc As RECTL
' Were we passed a hWnd?
' If not then get current control's hWnd
If hWnd = 0 Then hWnd = GetFocus
Call GetClientRect(hWnd, rc)
Call InvalidateRect(hWnd, rc, API_TRUE)
End Sub
' Code End

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"mikez" <mi*******@yahoo.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Anybody? Anyone have any further ideas or suggestions?
THanks!
mike

Aug 1 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.