Did you actually type it in to the code window - VBA IDE (Integrated
Development Environment)? Or, did you just type it in the properties dialog
that comes up with the form in Design View?
If you did the former, it's in the wrong place.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
____________________________________
Access 2000, 2003, 2007, SQL Server 2000, Crystal Reports 10/XI, VB6
WinXP, Vista
:
Not familar with code, so at a loss, but I put in
Me![ImageFrame].Picture = Me![Photo]
Now when I open the form I have a picture, but it does not change and I am
getting a runtime error 2220, that states, "Microsoft Access is unable to
open the path, h:\gmaa\photo...and it proceeds to give the correct path that
I need for that photo. You can hit "end" and go to the next file and the
path does match the photo that I need to display. If you hit "debug" you get
Me![ImageFrame].Picture = Me![Photo] highlighted in yellow.
:
In the current event of the form, use a line of code like:
Sub Form_Current()
Me.ImageControlName.Picture = Me.PathControlName
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
I have the table with all the employee data, including one text type,
called
"photo". In that cell I have the path to the photo I wish to display. I
also have an employee form. I am wanting to display a different photo
with
each record. Right now when open my form in normal view, the photo box is
displaying the text with the path to the photo, not the actual photo. How
can I fix this?