Image from file_name field

E

Ed Leaders

I have placed an image on a form and would like the picture in that image to
change as I go to a new record based on a field that I display on the form.

The field holds a path to the image I want to display.

I thought all I had to do was

ImageName.Picture = File_Name.text

and had placed this in the oncurrent property of the form.

But this does not work.

Any suggestions?

I have set the image property to link (not embedded)
 
E

Emilia Maxim

Ed Leaders said:
I have placed an image on a form and would like the picture in that image to
change as I go to a new record based on a field that I display on the form.

The field holds a path to the image I want to display.

I thought all I had to do was

ImageName.Picture = File_Name.text

and had placed this in the oncurrent property of the form.

I have set the image property to link (not embedded)

Ed,

the image control should be unbound, and you can leave it to embedded.
If the path control's name is File_Name, then the correct syntax would
be:

ImageName.Picture = Me!File_Name

You can read the Text property only as long as the text box has the
focus (see also Help).

However, if File_Name is a hyperlink, you would need to strip the #
signs if there are any before assigning the file name to the Picture
property.

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top