Relative Reference for a picture in a form

BOGARNZ

New member
Local time
Today, 22:30
Joined
Sep 10, 2015
Messages
1
:banghead::banghead:
Hi All

I have been trying for a few days to do what I was hoping would be simple.
I need to have displayed on a form, a picture of a person. I have a table where the image name is stored (as the image is in a separate folder next to the database) along with the person’s name. I need to link it to the relative path of where the database is stored. I can do it easily using a full file name stored in the database but this location is different to every user who logs on (I have to use dropbox). I have used the code from this website to get nearly there but I cannot get it all to work.
I can get some of the relative reference and some of the code but I just cannot get the whole lot to work together. I would really appreciate a step by step if someone has the time. I have included a mock database as the one I am using has too much sensitive data, but is just the same.
In the mock database, I have shown it both ways. The first 4 rows have the full file name and show the image in the first image box as it should. This works if the file is in my C drive. I have also tried to do it with just the file name and a relative reference for the last 4 rows. But I cannot get it to work. I would really appreciate some giving me a hand to show me where I went wrong and how I can fix this.
I thank you in advance.
Cheers
Craig
 

Attachments

your code is in a separate module instead of being behind the form. Go into design view on your form and the event property for on current. Go into Code Builder, then copy all of your code there and delete it from your module.
 

Users who are viewing this thread

Back
Top Bottom