Desparate-Need Assistance with Images in Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I am working with Ken Getz's saving images in external files and have
been moderately successful getting it to work. My problem lies in trying to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Dear Roger, thank you. I'll go have a look at your site and see how I make
out. If I am unsuccessful I'll repost.

Thanks again,
IEJ

Roger Carlson said:
Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



Hello, I am working with Ken Getz's saving images in external files and have
been moderately successful getting it to work. My problem lies in trying to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Dear Roger, thank you. I'll go have a look at your site and see how I make
out. If I am unsuccessful I'll repost.

Thanks again,
IEJ

Roger, thank you for the info, still having difficulty though. Just to
review for your thoughts. I have a form called frmImageDetailFile. When it
is not attached to anything the image previews fine with the code
Me![imgTheImage].Picture = Me![txtImagePathAndFile] on the On Open event.
Very long server path i.e.: \\Server
1\SubDirectory\SubSubDirectory\Filename.jpg don't know if that makes a
difference.

The minute I attach this subform to the main form it stops previewing the
picture. The subform is called frmImageDetailFileControl and is attached to
main form, called ME-frmCommercialForm, by a Folio No. Subform is a copy of
the form above.

Do I understand correctly that I should go to the On Current on main form to
get the image to preview from the imagepathandfile on the subform. This is
my take translation for your review:

Forms!
[ME-frmCommercialForm]!frmImageDetailFileControl.Form!imgTheImage=Forms![ME-frmCommercialForm]!frmImageDetailFileControl.Form!txtImagePathAndFile

I'm stuck. It kind of looks the same as yours but I'm not sure if the
syntax is correct to achieve the previewing. Should there be brackets around
anything else. Also, thank you for the subform reference info, I wasn't aware
of that so it was helpful for subforms, just not clear how the previewing
part is the same.

Thank you,

IEJ

Roger Carlson said:
Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



Hello, I am working with Ken Getz's saving images in external files and have
been moderately successful getting it to work. My problem lies in trying to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Subform referencing is tricky and depends on where you're doing it. The
very first thing to try is:
Me![imgTheImage].Picture = Me![txtImagePathAndFile] in the OnCurrent event
of the SUBFORM. This may be all you need. (I can't tell for sure without
creating a sample.)

If that doesn't work, try:
Forms![ME-frmCommercialForm]!frmImageDetailFileControl.Form!imgTheImage=Form
s![ME-frmCommercialForm]!frmImageDetailFileControl.Form!txtImagePathAndFile
in the OnCurrent event of the SUBFORM.

My suggestion to put it in the mainform was, I think, ill advised. You want
the picture to change when you move from record to record in the subform.
If neither of these work, let me know and I'll whip up a sample to fiddle
with it.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Dear Roger, thank you. I'll go have a look at your site and see how I make
out. If I am unsuccessful I'll repost.

Thanks again,
IEJ

Roger, thank you for the info, still having difficulty though. Just to
review for your thoughts. I have a form called frmImageDetailFile. When it
is not attached to anything the image previews fine with the code
Me![imgTheImage].Picture = Me![txtImagePathAndFile] on the On Open event.
Very long server path i.e.: \\Server
1\SubDirectory\SubSubDirectory\Filename.jpg don't know if that makes a
difference.

The minute I attach this subform to the main form it stops previewing the
picture. The subform is called frmImageDetailFileControl and is attached to
main form, called ME-frmCommercialForm, by a Folio No. Subform is a copy of
the form above.

Do I understand correctly that I should go to the On Current on main form to
get the image to preview from the imagepathandfile on the subform. This is
my take translation for your review:

Forms!
[ME-frmCommercialForm]!frmImageDetailFileControl.Form!imgTheImage=Forms![ME-
frmCommercialForm]!frmImageDetailFileControl.Form!txtImagePathAndFile

I'm stuck. It kind of looks the same as yours but I'm not sure if the
syntax is correct to achieve the previewing. Should there be brackets around
anything else. Also, thank you for the subform reference info, I wasn't aware
of that so it was helpful for subforms, just not clear how the previewing
part is the same.

Thank you,

IEJ

Roger Carlson said:
Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



in message Hello, I am working with Ken Getz's saving images in external files and
have
been moderately successful getting it to work. My problem lies in trying
to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location
i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look
at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached
to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Hi.

Looks like you and I have been doing the same thing. In my case I used the
existing form frmImageFileDataEntry as a subform, in order to get the image
path associated with a Student record. I too noticed that this arrangement
only worked for setting the link to the images - when you go back in, it
won't show you the images for paths already set. To get around this, I
created a separate subform. So now I have one Student form with a 'Set Link'
subform (frmImageFileDataEntry) and another Student form with a 'View/Delete
Image' subform. After setting up all the links to photos, they can be viewed
using the second Student form by clicking on a "Show Photo" button. Also ,
I've arranged for the image control to show green when a photo has been
allocated. This means that Users get a visual indication that a photo link
exists, without having to show the images all the time - I understand that it
causes lockup problems if Users wizz through the records quickly and they are
set to show images 'on current'. I also have a report, label style, which
shows fifteen Images per landscape page.

If you like I could cobble together a Sample mdb (Access 2000) that
illustrates what I've managed to do - with much help from this Discussion
Group of course. The problem is, I work on the db part time, so it could be
Tuesday or Wednesday of next week before I could get to it.

Let me have an EMail address if you want me to do this. Cheers, JohnB

Dear Roger, thank you. I'll go have a look at your site and see how I make
out. If I am unsuccessful I'll repost.

Thanks again,
IEJ

Roger, thank you for the info, still having difficulty though. Just to
review for your thoughts. I have a form called frmImageDetailFile. When it
is not attached to anything the image previews fine with the code
Me![imgTheImage].Picture = Me![txtImagePathAndFile] on the On Open event.
Very long server path i.e.: \\Server
1\SubDirectory\SubSubDirectory\Filename.jpg don't know if that makes a
difference.

The minute I attach this subform to the main form it stops previewing the
picture. The subform is called frmImageDetailFileControl and is attached to
main form, called ME-frmCommercialForm, by a Folio No. Subform is a copy of
the form above.

Do I understand correctly that I should go to the On Current on main form to
get the image to preview from the imagepathandfile on the subform. This is
my take translation for your review:

Forms!
[ME-frmCommercialForm]!frmImageDetailFileControl.Form!imgTheImage=Forms![ME-frmCommercialForm]!frmImageDetailFileControl.Form!txtImagePathAndFile

I'm stuck. It kind of looks the same as yours but I'm not sure if the
syntax is correct to achieve the previewing. Should there be brackets around
anything else. Also, thank you for the subform reference info, I wasn't aware
of that so it was helpful for subforms, just not clear how the previewing
part is the same.

Thank you,

IEJ

Roger Carlson said:
Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



in message Hello, I am working with Ken Getz's saving images in external files and
have
been moderately successful getting it to work. My problem lies in trying
to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location
i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look
at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached
to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Roger, thank you for the input I'll give it a try.

John B: Yes, this is exactly what I need as it is exactly the problem. I
would greatly appreciate it. In the meantime though, maybe with just a bit
more detail here from you I will be able to conquer it because it is the same
problem. I already have a button on the main form to perform the link
(equivalent to your Set Link), but the other one, the View/Delete, how did
you do it and where did you put it. Did you use of the existing forms or
make a new one (for my temporary fix, I made a new subform, copied the
tblImagesFile and change the imagepathandfile to hyperlink, so that it can be
clicked on to see the image on the subform, but still you don't get the image
right away, which is what I want). Also, about putting them on a report,
how did you do that. I actually only have a maximum of two pictures per
sheet so there's not that many so I was hoping to show them on the bottom of
the paper but I would definitely like to see how you did the pictures on one
page too. E-mail is: (e-mail address removed). Thanks again, IEJ







JohnB said:
Hi.

Looks like you and I have been doing the same thing. In my case I used the
existing form frmImageFileDataEntry as a subform, in order to get the image
path associated with a Student record. I too noticed that this arrangement
only worked for setting the link to the images - when you go back in, it
won't show you the images for paths already set. To get around this, I
created a separate subform. So now I have one Student form with a 'Set Link'
subform (frmImageFileDataEntry) and another Student form with a 'View/Delete
Image' subform. After setting up all the links to photos, they can be viewed
using the second Student form by clicking on a "Show Photo" button. Also ,
I've arranged for the image control to show green when a photo has been
allocated. This means that Users get a visual indication that a photo link
exists, without having to show the images all the time - I understand that it
causes lockup problems if Users wizz through the records quickly and they are
set to show images 'on current'. I also have a report, label style, which
shows fifteen Images per landscape page.

If you like I could cobble together a Sample mdb (Access 2000) that
illustrates what I've managed to do - with much help from this Discussion
Group of course. The problem is, I work on the db part time, so it could be
Tuesday or Wednesday of next week before I could get to it.

Let me have an EMail address if you want me to do this. Cheers, JohnB

Dear Roger, thank you. I'll go have a look at your site and see how I make
out. If I am unsuccessful I'll repost.

Thanks again,
IEJ

Roger, thank you for the info, still having difficulty though. Just to
review for your thoughts. I have a form called frmImageDetailFile. When it
is not attached to anything the image previews fine with the code
Me![imgTheImage].Picture = Me![txtImagePathAndFile] on the On Open event.
Very long server path i.e.: \\Server
1\SubDirectory\SubSubDirectory\Filename.jpg don't know if that makes a
difference.

The minute I attach this subform to the main form it stops previewing the
picture. The subform is called frmImageDetailFileControl and is attached to
main form, called ME-frmCommercialForm, by a Folio No. Subform is a copy of
the form above.

Do I understand correctly that I should go to the On Current on main form to
get the image to preview from the imagepathandfile on the subform. This is
my take translation for your review:

Forms!
[ME-frmCommercialForm]!frmImageDetailFileControl.Form!imgTheImage=Forms![ME-frmCommercialForm]!frmImageDetailFileControl.Form!txtImagePathAndFile

I'm stuck. It kind of looks the same as yours but I'm not sure if the
syntax is correct to achieve the previewing. Should there be brackets around
anything else. Also, thank you for the subform reference info, I wasn't aware
of that so it was helpful for subforms, just not clear how the previewing
part is the same.

Thank you,

IEJ

:

Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



in message Hello, I am working with Ken Getz's saving images in external files and
have
been moderately successful getting it to work. My problem lies in trying
to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location
i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look
at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached
to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Hi.

OK, I'll try and put a zipped sample db together next week, unless I read
here that you've cracked it yourself.

I actually created a new form and used it as a subform. So I have two near
identical Student main forms, one with my own design "Show/Edit Photos"
subform and the other with frmImageFileDataEntry used as a "Set Photos"
subform. You say ".... but still you don't get the image right away, which is
what I want". Well, I've set my "Show/Edit" subform to show images only when
the "Show Photo" button is clicked, but I've got some On Current code that
will make the image show in each Student record as it is selected. Sorry,
but I'm at home now and don't have access to the db which is in work. I'll
send you the code ASAP on Monday, or I may have it here on my other PC, in
which case perhaps later this evening.

As for the report, I used a label type report wizard and again used code in,
I think, the On Format event of the reports detail section. This gets the
images to show, based on a field showing the image path and file details. I'm
sure I got this from this Discussion Group but not necessarily as a reply to
one of my posts - you may wish to search through old posts. Again, I'll send
you details if I can find them either here over the weekend or at work on
Monday.

Putting two images at the bottom of a report? Hmmm. Not sure. That would be
OK if they can be one above the other because they are really just subform
records but not if they have to be side by side. I'm sure someone else could
solve that though - some way of introducing two columns in a certain section
of the report perhaps?

Good luck. I'll be in touch again soon if I can find that code I spoke
about. Otherwise, will send a zipped sample ASAP next week. JohnB


Roger, thank you for the input I'll give it a try.

John B: Yes, this is exactly what I need as it is exactly the problem. I
would greatly appreciate it. In the meantime though, maybe with just a bit
more detail here from you I will be able to conquer it because it is the same
problem. I already have a button on the main form to perform the link
(equivalent to your Set Link), but the other one, the View/Delete, how did
you do it and where did you put it. Did you use of the existing forms or
make a new one (for my temporary fix, I made a new subform, copied the
tblImagesFile and change the imagepathandfile to hyperlink, so that it can be
clicked on to see the image on the subform, but still you don't get the image
right away, which is what I want). Also, about putting them on a report,
how did you do that. I actually only have a maximum of two pictures per
sheet so there's not that many so I was hoping to show them on the bottom of
the paper but I would definitely like to see how you did the pictures on one
page too. E-mail is: (e-mail address removed). Thanks again, IEJ







JohnB said:
Hi.

Looks like you and I have been doing the same thing. In my case I used the
existing form frmImageFileDataEntry as a subform, in order to get the image
path associated with a Student record. I too noticed that this arrangement
only worked for setting the link to the images - when you go back in, it
won't show you the images for paths already set. To get around this, I
created a separate subform. So now I have one Student form with a 'Set Link'
subform (frmImageFileDataEntry) and another Student form with a 'View/Delete
Image' subform. After setting up all the links to photos, they can be viewed
using the second Student form by clicking on a "Show Photo" button. Also ,
I've arranged for the image control to show green when a photo has been
allocated. This means that Users get a visual indication that a photo link
exists, without having to show the images all the time - I understand that it
causes lockup problems if Users wizz through the records quickly and they are
set to show images 'on current'. I also have a report, label style, which
shows fifteen Images per landscape page.

If you like I could cobble together a Sample mdb (Access 2000) that
illustrates what I've managed to do - with much help from this Discussion
Group of course. The problem is, I work on the db part time, so it could be
Tuesday or Wednesday of next week before I could get to it.

Let me have an EMail address if you want me to do this. Cheers, JohnB

:

Dear Roger, thank you. I'll go have a look at your site and see how I make
out. If I am unsuccessful I'll repost.

Thanks again,
IEJ


Roger, thank you for the info, still having difficulty though. Just to
review for your thoughts. I have a form called frmImageDetailFile. When it
is not attached to anything the image previews fine with the code
Me![imgTheImage].Picture = Me![txtImagePathAndFile] on the On Open event.
Very long server path i.e.: \\Server
1\SubDirectory\SubSubDirectory\Filename.jpg don't know if that makes a
difference.

The minute I attach this subform to the main form it stops previewing the
picture. The subform is called frmImageDetailFileControl and is attached to
main form, called ME-frmCommercialForm, by a Folio No. Subform is a copy of
the form above.

Do I understand correctly that I should go to the On Current on main form to
get the image to preview from the imagepathandfile on the subform. This is
my take translation for your review:

Forms!
[ME-frmCommercialForm]!frmImageDetailFileControl.Form!imgTheImage=Forms![ME-frmCommercialForm]!frmImageDetailFileControl.Form!txtImagePathAndFile

I'm stuck. It kind of looks the same as yours but I'm not sure if the
syntax is correct to achieve the previewing. Should there be brackets around
anything else. Also, thank you for the subform reference info, I wasn't aware
of that so it was helpful for subforms, just not clear how the previewing
part is the same.

Thank you,

IEJ


:

Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



in message Hello, I am working with Ken Getz's saving images in external files and
have
been moderately successful getting it to work. My problem lies in trying
to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location
i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look
at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached
to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Hi again.Just found this. Go to a post called "How do I get a picture in a
report to change...." dated 16th April 2005 in the Reports section of this
Discussion group. It will give code to print pictures in a report. Read all
of it though - the first reply gives code based on the field containing only
the image name. Subsequent replies give the code we need. Will supply other
code ASAP. JohnB

Roger, thank you for the input I'll give it a try.

John B: Yes, this is exactly what I need as it is exactly the problem. I
would greatly appreciate it. In the meantime though, maybe with just a bit
more detail here from you I will be able to conquer it because it is the same
problem. I already have a button on the main form to perform the link
(equivalent to your Set Link), but the other one, the View/Delete, how did
you do it and where did you put it. Did you use of the existing forms or
make a new one (for my temporary fix, I made a new subform, copied the
tblImagesFile and change the imagepathandfile to hyperlink, so that it can be
clicked on to see the image on the subform, but still you don't get the image
right away, which is what I want). Also, about putting them on a report,
how did you do that. I actually only have a maximum of two pictures per
sheet so there's not that many so I was hoping to show them on the bottom of
the paper but I would definitely like to see how you did the pictures on one
page too. E-mail is: (e-mail address removed). Thanks again, IEJ







JohnB said:
Hi.

Looks like you and I have been doing the same thing. In my case I used the
existing form frmImageFileDataEntry as a subform, in order to get the image
path associated with a Student record. I too noticed that this arrangement
only worked for setting the link to the images - when you go back in, it
won't show you the images for paths already set. To get around this, I
created a separate subform. So now I have one Student form with a 'Set Link'
subform (frmImageFileDataEntry) and another Student form with a 'View/Delete
Image' subform. After setting up all the links to photos, they can be viewed
using the second Student form by clicking on a "Show Photo" button. Also ,
I've arranged for the image control to show green when a photo has been
allocated. This means that Users get a visual indication that a photo link
exists, without having to show the images all the time - I understand that it
causes lockup problems if Users wizz through the records quickly and they are
set to show images 'on current'. I also have a report, label style, which
shows fifteen Images per landscape page.

If you like I could cobble together a Sample mdb (Access 2000) that
illustrates what I've managed to do - with much help from this Discussion
Group of course. The problem is, I work on the db part time, so it could be
Tuesday or Wednesday of next week before I could get to it.

Let me have an EMail address if you want me to do this. Cheers, JohnB

:

Dear Roger, thank you. I'll go have a look at your site and see how I make
out. If I am unsuccessful I'll repost.

Thanks again,
IEJ


Roger, thank you for the info, still having difficulty though. Just to
review for your thoughts. I have a form called frmImageDetailFile. When it
is not attached to anything the image previews fine with the code
Me![imgTheImage].Picture = Me![txtImagePathAndFile] on the On Open event.
Very long server path i.e.: \\Server
1\SubDirectory\SubSubDirectory\Filename.jpg don't know if that makes a
difference.

The minute I attach this subform to the main form it stops previewing the
picture. The subform is called frmImageDetailFileControl and is attached to
main form, called ME-frmCommercialForm, by a Folio No. Subform is a copy of
the form above.

Do I understand correctly that I should go to the On Current on main form to
get the image to preview from the imagepathandfile on the subform. This is
my take translation for your review:

Forms!
[ME-frmCommercialForm]!frmImageDetailFileControl.Form!imgTheImage=Forms![ME-frmCommercialForm]!frmImageDetailFileControl.Form!txtImagePathAndFile

I'm stuck. It kind of looks the same as yours but I'm not sure if the
syntax is correct to achieve the previewing. Should there be brackets around
anything else. Also, thank you for the subform reference info, I wasn't aware
of that so it was helpful for subforms, just not clear how the previewing
part is the same.

Thank you,

IEJ


:

Where are you putting the code? In the OnCurrent event? If so, it looks
good to me. That fact that it does not work, however, means you have to
look elsewhere. Make sure you've got the code in the right event procedure
and that everything is spelled correctly.

On the subform front, you have to reference your objects a little
differently. Generically, it looks something like this:
Forms!Mainform!subFormControl.Form!ImageControl =
Forms!Mainform!subFormControl.Form!TextBoxHoldingPath

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called SubformReference.mdb which shows how to reference a number of
things with forms, subforms, and sub-subforms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



in message Hello, I am working with Ken Getz's saving images in external files and
have
been moderately successful getting it to work. My problem lies in trying
to
get the image to attach to the path on a form or a report. I can get the
image to view on the initial attachment when I go to the file location
i.e.
\\server1\Subdirectory\Subsubdirectory\Filename.jpg. And it lets you look
at
it correctly before you close but if I got back to the storage form and
scroll through the images the pathandfile rolls forward correctly attached
to
its identifier but the image won't. Code is:
Me![imgTheImage].Picture=Me.[txtImagePathAndFile].

Further difficulty with trying to attach this same form as a subform, or a
subreport. Immediately on doing this the images cease to view at all.

Can anyone help me with this.

Thank you,
IEJ
 
Back
Top