Bill,
The error message is telling you that the file cannot be opened; I think
it's probably saying 'FCS Graphics ...' because that's the default
association you have set on your system for .jpg files. What happens if
you try to open that file directly (eg. by double-clicking it in Windows
Explorer)?
Rob
"Bill Foley" <pttincatitexasdotnet> wrote in message
When I open the form and first image tries to appear, the error message
says:
"Error number 2220: FCS Graphics can't open the file
'D:\PTT\calhoun\New STM Stuff\New Material\VOL_02\spanela.jpg'.
There aren't any permissions associated with the new folders. There
were merely added subfolders. Is there some sort of path length
problem that I just happened to fall over? Sorry, but I'm grabbing at
straws. This makes no sense to me.
Thanks again for your help!
--
Bill Foley
Microsoft Office Specialist Master Instructor
www.pttinc.com
message PMFJI,
I don't see anything obviously wrong, so here's a suggestion which may
help to find the problem:
Your error handler is displaying the default "noimage" image. Try
commenting that out, and replace it with code to display the error
code and message, so you can find what's failing. It may be that the
error is coming from something external - like a typo in the filename,
or no access permission on the new folder, or ...
HTH,
Rob
"Bill Foley" <pttincatitexasdotnet> wrote in message
I just opened the form, went into the code to see the Immediate Window
(see below) and the path to the image is there, but the image itself
did not show up.
Here is the complete code (with the previous stuff added to check it
out). The line that is commented out used to work before I moved the
images into the individual folders (actually I copied them so the
images show if I uncomment that line and comment out the new way).
Private Sub Form_Current()
On Error GoTo ErrorHandler
'This part I added to see the results in the Immediate Window (see
below)
Debug.Print "D:\ptt\Calhoun\New STM Stuff\New Material\New Graphics\"
_
& [VolumeNumber].Value & "\" _
& [FileName].Value & ".jpg"
'This is the new way using the subfolder field [VolumeNumber]
[Image19].Picture = "D:\ptt\Calhoun\New STM Stuff\New Material\New
Graphics\" _
& [VolumeNumber].Value & "\" _
& [FileName].Value & ".jpg"
'This is the way I had it initially and still works (currently
commented out)
'[Image19].Picture = "D:\ptt\Calhoun\New STM Stuff\New Material\New
Graphics\" & [FileName].Value & ".jpg"
GoTo Done
ErrorHandler:
[Image19].Picture = "D:\ptt\Calhoun\New STM Stuff\New Material\New
Graphics\noimage.jpg"
Done:
End Sub
Immediate Window (for the first image) on the form shows correctly:
D:\ptt\Calhoun\New STM Stuff\New Material\New
Graphics\VOL_02\spanela.jpg
However, the "noimage.jpg" file continues to show and none of the
real images show. Any help (probably so obvious I'll slap myself)
would be appreciated.
TIA!
--
Bill Foley
Microsoft Office Specialist Master Instructor
www.pttinc.com
hmm, well, i agree with you that it's strange. you could post the
entire
procedure; maybe one of us will spot something that's causing the
problem.
hth
"Bill Foley" <pttincatitexasdotnet> wrote in message
I tried it and the correct path is showing up for each image. I
have
error
checking in the code to show a "fake image" if it can't find the
correct
image. The fake image is showing up on the form for each record
but when
I
go back into the Immediate Window the correct path is showing up
for each
image. The darndest thing I have ever seen!
Any other ideas? Would it be worth posting the entire
"Form_Current"
code?
--
Bill Foley
Microsoft Office Specialist Master Instructor
www.pttinc.com
did you try putting a Break on your code and stepping through it
so you
can
examine the value returned by VolumeNumber.Value? or you can
comment out
the
line of code, and add a Debug.Print line below it, as
Debug.Print "D:\mypath\myfolders\" _
& [VolumeNumber].Value & "\" _
& [FileName].Value & ".jpg"
run the code from the form as usual, then open the Immediate
window in
the
VB Editor, and examine the printed string to see what may be
incorrect.
hth
"Bill Foley" <pttincatitexasdotnet> wrote in message
Hey Gang,
Access 2003
I have a form with an image holder that is filled with a JPG
from a
folder.
I originally had it hardcoded to that path plus the filename
plus
".jpg".
It worked fine, but then I needed to break all images (over 1500
of
them)
into separate folders. I added a field to the table
representing these
new
folders and broke each set of images into their respective
folder. I
am
now
trying to hardcode part of the path and variable the rest and it
is not
working.
This worked before (when all images in the same folder):
[Image19].Picture = "D:\mypath\myfolders\" & [FileName].Value &
".jpg"
Now the last folder in this new path is based on the field
"VolumeNumber".
I have tried the following (and variations) to no avail:
[Image19].Picture = "D:\mypath\myfolders\" &
[VolumeNumber].Value & "\"
&
[FileName].Value & ".jpg"
I am sure I am missing the obvious, but I AM missing it so I
need
assistance.
TIA!