Hello Everyone,
My job has recently decided that I need to build a database of test pictures, I've read many forums on the link pictures / putting browse button as I gather it makes the database too large with attachments.
My problem is I think I grasp the concept but I cant seem to use the code / Im not sure where im actually putting the code.
e.g imgControl.Picture = CurrentProjectPath & subforldername & Me.ImageName
Where do I put this ? does this go in the field or in a macro ?
Also for the browse to button I have this
Private Sub Explore_Click()
' Gets a filename from the filedialog control and puts it into
the
' "Filename" textbox control.
' Be sure to rename the Common Dialog Control "cd1"
On Error GoTo Err_Explore_Click
' Uncomment the next line to specify only a certain type of file
' to browse for (in your case jpeg files).
'cd1.Filter = "Text Files|*.jpg"
CD1.ShowOpen
Filename.SetFocus
Filename.Text = CD1.Filename
Exit Sub
Err_Explore_Click:
MsgBox Err.Description
Exit Sub
When i try to put this into a button it doesnt work
I know I sound like an idiot and thats because I am but I still have a job to do, so any help in this matter would be greatly appreciated.
I've attached my amazing database for reference, you will see pictures attached, these were before I knew about linking and I want the links to work like the attachments.
I'm sorry as I know this topic has been covered but I cannot seem to grasp it
(using access 2007)
ok I've found this
Private Sub Form_Current()
Dim ximg, path path = "C:\picturefolder" ximg = Me![employeenumber] Me.Photo.Picture = path & ximg & ".jpg"
End Sub
Correct the above Code whereever change required to match the foldername, employeenumber etc.
This works well for one picture per page, is there any way i can adjust this in order to have multiple images appear on one form
also would they be a way to make a button so you click it an choose the image you want to display in a certain box, like the way the attachments work?
any help massively appreciated