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

Linking to image does not "stick"

P: n/a
Ken
I have a win 2000 database of autographs and scanned photos. They are
in the SAME directory. In the table, my "ImagePath" text field shows
JUST the image name (i.e. "blank.jpg"). I have an image field that
links to the ImagePath field. But it does not display in the form.

I go in and delete the image field and add it back in and link it to
the "blank.jpg" file (its a dummy jpg that says "Not Avail"). Then I
make sure it is linked and not embedded. I close design mode and go
open the form and it works perfectly. I save the form and the database
and exit. I come back in to the database and the stupid form just
displays the "blank.jpg" even though as I scroll through the records
on the form, the correct file name changes in the ImagePath text field
as each record changes.

WHAT GIVES????? I am going NUTS!!!

Ken
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Ken" <ne***********@mail.com> wrote in message
news:9b**************************@posting.google.c om...
I have a win 2000 database of autographs and scanned photos. They are
in the SAME directory. In the table, my "ImagePath" text field shows
JUST the image name (i.e. "blank.jpg"). I have an image field that
links to the ImagePath field. But it does not display in the form.

I go in and delete the image field and add it back in and link it to
the "blank.jpg" file (its a dummy jpg that says "Not Avail"). Then I
make sure it is linked and not embedded. I close design mode and go
open the form and it works perfectly. I save the form and the database
and exit. I come back in to the database and the stupid form just
displays the "blank.jpg" even though as I scroll through the records
on the form, the correct file name changes in the ImagePath text field
as each record changes.

WHAT GIVES????? I am going NUTS!!!


That is unlikely. You probably gained that distinction when you took up
database development; in any case, that's what quite a number of people have
said about me. <G>

Alas, it is difficult for me to understand what you have... because there is
no "image field" in Access. Could it be that you are working with "OLE
fields" and "Bound OLE Frames", or something else?

Just FYI, for multiple reasons, I rarely ever store pictures as OLE Objects
for display in OLE Frames.

In any case, there are sample databases at http://accdevel.tripod.com
illustrating three approaches to handling images in Access. There's also an
article in the download discussing considerations in which approach to
choose.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #2

P: n/a
Ken
Larry,
Thanks for replying. I put the following code in my imageframe code:

Private Sub Form_Current()
On Error Resume Next
MyPath = "E:\Programs\CFusionMX\wwwroot\Starsigners\h5zrig1 u\"
Me![ImageFrame].Picture = MyPath & Me![ImagePath]
End Sub

Private Sub ImagePath_AfterUpdate()
On Error Resume Next
MyPath = "E:\Programs\CFusionMX\wwwroot\Starsigners\h5zrig1 u\"
Me![ImageFrame].Picture = MyPath & Me![ImagePath]
End Sub

That let me keep just the file name in the text field. Do you see
anyhting wrong with the code? I am uploading the database to a web
page and that seems to work locally.

I am linking the files; the ImageFrame field is the image control.

Ken
"Larry Linson" <bo*****@localhost.not> wrote in message news:<Av*******************@nwrddc01.gnilink.net>. ..
"Ken" <ne***********@mail.com> wrote in message
news:9b**************************@posting.google.c om...
I have a win 2000 database of autographs and scanned photos. They are
in the SAME directory. In the table, my "ImagePath" text field shows
JUST the image name (i.e. "blank.jpg"). I have an image field that
links to the ImagePath field. But it does not display in the form.

I go in and delete the image field and add it back in and link it to
the "blank.jpg" file (its a dummy jpg that says "Not Avail"). Then I
make sure it is linked and not embedded. I close design mode and go
open the form and it works perfectly. I save the form and the database
and exit. I come back in to the database and the stupid form just
displays the "blank.jpg" even though as I scroll through the records
on the form, the correct file name changes in the ImagePath text field
as each record changes.

WHAT GIVES????? I am going NUTS!!!


That is unlikely. You probably gained that distinction when you took up
database development; in any case, that's what quite a number of people have
said about me. <G>

Alas, it is difficult for me to understand what you have... because there is
no "image field" in Access. Could it be that you are working with "OLE
fields" and "Bound OLE Frames", or something else?

Just FYI, for multiple reasons, I rarely ever store pictures as OLE Objects
for display in OLE Frames.

In any case, there are sample databases at http://accdevel.tripod.com
illustrating three approaches to handling images in Access. There's also an
article in the download discussing considerations in which approach to
choose.

Larry Linson
Microsoft Access MVP

Nov 12 '05 #3

P: n/a
You are "uploading the database to a web server"? Are these Access' Data
Access Pages? Otherwise, you can't run an Access application from a web
page.

You can upload the _tables and data_ and use them from classic .asp or
ASP.NET pages, from FrontPage 2002/2003 with the Database Interaction
Wizard, from Cold Fusion and other third party products, but you can't use
your Access Forms, Reports and code on the web (except within the
limitations of Data Access Pages).

Please clarify if I have misunderstood.

Larry Linson
Microsoft Access MVP

"Ken" <ne***********@mail.com> wrote in message
news:9b**************************@posting.google.c om...
Larry,
Thanks for replying. I put the following code in my imageframe code:

Private Sub Form_Current()
On Error Resume Next
MyPath = "E:\Programs\CFusionMX\wwwroot\Starsigners\h5zrig1 u\"
Me![ImageFrame].Picture = MyPath & Me![ImagePath]
End Sub

Private Sub ImagePath_AfterUpdate()
On Error Resume Next
MyPath = "E:\Programs\CFusionMX\wwwroot\Starsigners\h5zrig1 u\"
Me![ImageFrame].Picture = MyPath & Me![ImagePath]
End Sub

That let me keep just the file name in the text field. Do you see
anyhting wrong with the code? I am uploading the database to a web
page and that seems to work locally.

I am linking the files; the ImageFrame field is the image control.

Ken
"Larry Linson" <bo*****@localhost.not> wrote in message

news:<Av*******************@nwrddc01.gnilink.net>. ..
"Ken" <ne***********@mail.com> wrote in message
news:9b**************************@posting.google.c om...
I have a win 2000 database of autographs and scanned photos. They are
in the SAME directory. In the table, my "ImagePath" text field shows
JUST the image name (i.e. "blank.jpg"). I have an image field that
links to the ImagePath field. But it does not display in the form.

I go in and delete the image field and add it back in and link it to
the "blank.jpg" file (its a dummy jpg that says "Not Avail"). Then I
make sure it is linked and not embedded. I close design mode and go
open the form and it works perfectly. I save the form and the database
and exit. I come back in to the database and the stupid form just
displays the "blank.jpg" even though as I scroll through the records
on the form, the correct file name changes in the ImagePath text field
as each record changes.

WHAT GIVES????? I am going NUTS!!!


That is unlikely. You probably gained that distinction when you took up
database development; in any case, that's what quite a number of people have said about me. <G>

Alas, it is difficult for me to understand what you have... because there is no "image field" in Access. Could it be that you are working with "OLE
fields" and "Bound OLE Frames", or something else?

Just FYI, for multiple reasons, I rarely ever store pictures as OLE Objects for display in OLE Frames.

In any case, there are sample databases at http://accdevel.tripod.com
illustrating three approaches to handling images in Access. There's also an article in the download discussing considerations in which approach to
choose.

Larry Linson
Microsoft Access MVP

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.