Re: Show new pictures in image control

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Ahhh there was a space in the filename I didn't see - works great now.
Thanks for the help!

"bob" <exponent@xxxxxxxxxxx> wrote in message
news:44da5e51$1@xxxxxxxxxxxxxxxxxx


I just tried your exact code (in the Form_Current event) using the same
path and filename and it worked
for me. I can only suggest making absolutely sure that the path is
correct, and try opening the image
in a graphics app to verify the image is ok (try copying the path from the
table then pasting it in the
app's file-open dialog).



--
_______________________________________________________
DBPix 2.0: Add pictures to Access, Easily & Efficiently
http://www.ammara.com/dbpix/access.html




"Jean Van Harlingen" <javh@xxxxxxxxxxxxx> wrote:
The path is D:\jpg\filename.jpg - so no relative path

"bob" <exponent@xxxxxxxxxxx> wrote in message
news:44da4ce0$1@xxxxxxxxxxxxxxxxxx


What path do you see in the error message?

If you're trying to use a relative path then your code is making
assumptions about the 'current' path -
see the following articles:

http://www.ammara.com/access_image_faq/image_relative_paths.html

http://www.ammara.com/access_image_faq/get_mdb_database_path.html


--
_______________________________________________________
DBPix 2.0: Add pictures to Access, Easily & Efficiently
http://www.ammara.com/dbpix/access.html




"Jean Van Harlingen" <javh@xxxxxxxxxxxxx> wrote:
I am trying to set up a form that will display pictures in an image
control
based on the contents of a text box control that contains the path to
the
external image file. In design view I am able to access the external
image
file, but when I try to change the picture property of the image control
via
VBA I get an error message which says that access can't open the
external
file.

This is the code I am using:

Dim Pf As String
If Not IsNull(Me.PictureFile) Then
Pf = (Me.PictureFile)
Me!ActualImage.Picture = Pf
Else
Me!ActualImage.Picture = ""
End If

Any ideas???








.



Relevant Pages

  • Re: Show new pictures in image control
    ... DBPix 2.0: Add pictures to Access, ... based on the contents of a text box control that contains the path to the ... VBA I get an error message which says that access can't open the external ...
    (microsoft.public.access.forms)
  • Re: Insert picture -- render picture on form/report from stored path/filename
    ... MVP Access ... Personally, when I use a date in a filename, I use this format: ... the image control is the icon on the toolbox with the mountains and the sun ... It's a bad idea to store pictures as OLE objects. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Insert picture -- render picture on form/report from stored path/filename
    ... to elaborate on what Sreedhar wrote: ... Personally, when I use a date in a filename, I use this format: ... the image control is the icon on the toolbox with the mountains and the sun ... It's a bad idea to store pictures as OLE objects. ...
    (microsoft.public.access.modulesdaovba)
  • Cant access user accounts via control panel
    ... every time I try to click on user accounts in the control ... panel notepad opens with a error message to read as ... The filename, directory name, or volume label syntax is ...
    (microsoft.public.windowsxp.security_admin)
  • Re: inserting multiple pictures and description
    ... {MERGEFIELD filename} ... your report. ... pictures and descriptions on my document. ... Dim szPicPath As String, lRowCounter As Long ...
    (microsoft.public.word.vba.customization)