Adding a path for a photo based on table info

Elmobram22

Registered User.
Local time
Today, 23:12
Joined
Jul 12, 2013
Messages
165
Hi,

I have a form where I can add a new resident. It runs off a query that shows ID as null and has a button to add the data and refresh the form and query. I used to drop in OLE files but have since changed it to a linked image file. What I want to do is pull the info from the data that I input as a new resident. Basically it means that any staff member can take a photo of the resident and put it in a folder and the database will point to that file. The location is...
"C:\Users\RP\"&[First Name]&" "&[Last Name]&".jpeg"
First Name and Last Name are in the table already. I have tried using an append and an update query to no avail.

Cheers,

Paul
 
I don't exactly know your setup. but thi sshould update the image after a record selection change:

Code:
Private Sub Form_AfterUpdate()
    Image0.Picture = "C:\Users\username\Pictures\" & [first_name] & " " & [last_name] & ".jpg"
End Sub
 
Hi,

I got round it by adding the images to the reports by creating a query with the selected info ("C:\Users\RP\"&[First Name]&" "&[Last Name]&".jpg") and pointing to that but thanks for the reply :)

Cheers,

Paul
 

Users who are viewing this thread

Back
Top Bottom