p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: Access 97 to open jpeg image with IE


Message #1 by "Jim Wilson" <jrwilson@c...> on Tue, 11 Jun 2002 00:08:09
I have an Access 97 database in which a table is used to control user 
reporting.  This table contains the name of the report (as the user knows 
it), the internal name as defined in Access, the name of a selection 
criteria form and the name of a sample image file.  Users can select from 
Preview, Print or View sample.  The sample is being made available in case 
the user is not sure if the report will suit their need.

I created a maco which uses RunApp with the command line spec of: 
C:\Program Files\Internet Explorer\Iexplore.exe [txtSampleImageName] where 
[txtSampleImageName] is the name of a field on the report switchboard that 
shows the full path to the image file I want to open with IE.  I was 
hoping it would get passed to IE as part of the start command line, but it 
ends up as: 
http://[txtSampleImageName]
Needless to say, this gives the ever-popular page not found message.
If I knew VBA, I probably coulda done it, but I don't, so I'm putting it 
out to you all.

Thanks in advance,

Jim
Message #2 by "Jim Wilson" <jrwilson@c...> on Tue, 11 Jun 2002 17:53:34
After fiddling around with this a bit more, I got it to work by placing the string ="C:\Program 
Files\Internet Explorer\Iexplore.exe " & [txtSampleImageName] in the command area of the 
RunApp macro.

Following some discussion with a coworker on the project, we determined it would be better 
to have the user's default application open the file instead of IE.  That way we don't have to 
be concerned about the location of their copy of IE, or whether they even have it on their 
machine or not.

So, the question becomes: How can I open the file using the user's default application?
Message #3 by braxis@b... on Tue, 11 Jun 2002 17:51:02 +0100 (BST)
Jim

Have a look here: http://www.mvps.org/access/api/api0018.htm



>  from:    Jim Wilson <jrwilson@c...>
>  date:    Tue, 11 Jun 2002 18:53:34
>  to:      access@p...
>  subject: Re: [access] Re: Access 97 to open jpeg image with IE
> 
> After fiddling around with this a bit more, I got it to work by placing the string ="C:\Program 
> Files\Internet Explorer\Iexplore.exe " & [txtSampleImageName] in the command area of the 
> RunApp macro.
> 
> Following some discussion with a coworker on the project, we determined it would be better 
> to have the user's default application open the file instead of IE.  That way we don't have to 
> be concerned about the location of their copy of IE, or whether they even have it on their 
> machine or not.
> 
> So, the question becomes: How can I open the file using the user's default application?


  Return to Index