Good job!

J

Jon Bratten

Probably saved a couple of hours or more.
does anyone have a procedure for adding different images per record in a
continuous form view, using a2007.

thanks
On Thursday, October 22, 2009 10:48 AM Allen Browne wrote:
The Image control has a Control Source in Access 2007.

So, if you have the fully qualified file name in a field, just set the
Control Source of your image control to this field. No code needed.
On Tuesday, February 09, 2010 9:50 AM Michael van der Nest wrote:
I experimented with some stuff after reading Allen's post and I come up with a solution.



Steps:

1. Saves images to a folder. I've saved my images to a diretory that's in the same directory of the database.



2. have a field in a table with the relative path to the image. e.g. Field Name: ImagePath, Value: image\mypicture.png



3. Create a public function that returns the path of the current project (CurrentProject.Path). I've called mine, GetCurrentPath().



3. On the continuous form create the following controls;

a. bound text box to ImagePath field.

b. unbound text box with the control source as '=GetCurrentPath() & "\" & [ImagePath]'. Name it ImagePathText.

c. unbound image control with the control source equal to the unbound text box. e.g. '=[ImagePathText]'
 

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