Share via

Adding image that changes from record to record in a form or report

Anonymous
2023-06-14T14:20:47+00:00

Hello everyone out there.

In my form and report, I have image that changes for each record with the image path store in a text field in a table.

The images are displayed well and changes per record but when I use the database on another system with the image path possibly on a different directory, it gives error and doesn't work again unless I change the image path for each record

How can I have the image saved for each record and display it even on any system without issues?

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2023-06-14T17:48:17+00:00

I agree with Tom's solution, but this needs some planning. You need to define what path the files are in on your PC and what path they may be on another PC.

Another solution would be to store the images in a subfolder of the folder the Access app is in. Then you could use the Project path to generate the image path.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
2023-06-14T14:30:16+00:00

By storing a relative path.

So rather than c:\users\myname\pics\2022\1.jpg and c:\users\myname\pics\2023\2.jpg

you would set the path to:

2022\1.jpg and 2023\2.jpg

Then additionally you have a tblSystemSettings, with the path to the parent folder, in your case: c:\users\myname\pics\ and in the other user's case it will be different; maybe c:\users\hername\pics. You would read system settings into global variables at startup time.

So with 1 change you have configured the app to run with ANY folder tree.

Of course, you now have to concatenate the two strings to arrive at the full path.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2023-06-15T03:06:57+00:00

    Sorry, but no. There is not enough time in the day. If my instructions are unclear, ask specific questions. If you feel overwhelmed, maybe hiring the necessary talent is the best idea,

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2023-06-14T21:27:31+00:00

    You need to explain how the images are stored now.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-06-14T17:51:55+00:00

    Thanks a lot for your prompt response and the solution you have proffered.

    However, this seems difficult for me to implement.

    Can you help me with any sample database that illustrates this or the steps to build the technicalities into my database.

    Again, thanks a lot

    Was this answer helpful?

    0 comments No comments