473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Opening a jpg file. Code from Lebans

I use access 2002 with windows XP. I don't think that I encountered the same
problem with Windows 2000

The following opens an image (code from Lebans)
fLoadPicture Me.JGSForm.Form.Image1, "e:\pictures\test.jpg"
if I specify the path and file name as above then the picture opens

My problem: If I specify it as follows
fLoadPicture Me.JGSForm.Form.Image1, IPath & Me!StCode & ".jpg"
then the picture opens but windows explorer also opens automatically and I
have to close windows explore first

the exact same happens if I use
MyImage = IPath & Me!StCode & ".jpg"
Application.FollowHyperlink MyImage, , True
If I use "c\pictures\test.jpg" instead of MyIimage then again windows
explorer opens to c:\pictures\test.jpg
Nov 12 '05 #1
1 2684
Try running this code with a Debug.Print of the generated path and filename
just before the LoadPicture, with a breakpoint on the Load Picture
statement. My guess would be that there is something gone awry with your
building the string for path and filename.

Larry Linson
Microsoft Access MVP

"Alfred" <sp**************@hotmail.com> wrote in message
news:bn**********@ctb-nnrp2.saix.net...
I use access 2002 with windows XP. I don't think that I encountered the same problem with Windows 2000

The following opens an image (code from Lebans)
fLoadPicture Me.JGSForm.Form.Image1, "e:\pictures\test.jpg"
if I specify the path and file name as above then the picture opens

My problem: If I specify it as follows
fLoadPicture Me.JGSForm.Form.Image1, IPath & Me!StCode & ".jpg"
then the picture opens but windows explorer also opens automatically and I
have to close windows explore first

the exact same happens if I use
MyImage = IPath & Me!StCode & ".jpg"
Application.FollowHyperlink MyImage, , True
If I use "c\pictures\test.jpg" instead of MyIimage then again windows explorer opens to c:\pictures\test.jpg

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stephen Layton | last post by:
Manipulating comdlg32.dll using Ken Getz code below: ahtCommonFileOpenSave InitialDir:="F:\DiocesanDatabase\" & strNoSlashHouseNumber, _ Filter:=strFilter, FilterIndex:=1, Flags:=lngFlags, _...
4
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
4
by: Shumit Rehman | last post by:
Hi I have a table which has path names to photos I would like to view. I would like to open some/any kind of image viewer(Paint) to see the picture when I click the pathname. The pictures are...
5
by: Steve | last post by:
Hi Can anyone tell me if it is possible to save a picture stored in an OLE objects on a form (bound object frame / unbound object frame) to a file. I have seen a command SavePicture Picture as...
3
by: Simon Rowe | last post by:
Probably really simple but I cant work it out... I have a list box on a form with a few records in. When I open the form the first record is sort of highlight with a dashed box, when I cursor...
9
by: 2D Rick | last post by:
With the help from members in the VB forum I've pieced together code that works in VB6 to create radial text similar to "text on a path" seen in graphics programs.(on a circle only) I use an...
13
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text...
2
by: Lyle Fairfield | last post by:
I am using Microsoft’s Web Browser Control embedded on an Access Form to browse a specific site. I have a good reason for doing so; the pages on this site run code which aborts their display unless...
11
by: Nick 'The Database Guy' | last post by:
How do I acheive this, any one know. Thanks in advance. Nick
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.