mjlaroda
asked on
Automatically insert pictures into a form according to record ID
Hello,
I’m using Access 2007 and I’m trying to insert a picture into a form according to the ID number of the form record, I have tried the below with a text box as well as an OLE Object, with the text box I get literally text in the box as in: C:\Users\mlaroda\Desktop\M uscleTuneF itness\Pic s\9.bmp
With the OLE Object box I get nothing but a blank box, I’m not a programmer so please keep it as simple as possible, the code I have is below
Private Sub Command120_Click()
Dim XFLName As Integer
Dim strPic As String
XFLName = ID
strPic = ("C:\Users\mlaroda\Desktop \MuscleTun eFitness\P ics\" & XFLName & ".bmp")
Me.tbl_Con_Photo = strPic
End Sub
Thanks in advance
I’m using Access 2007 and I’m trying to insert a picture into a form according to the ID number of the form record, I have tried the below with a text box as well as an OLE Object, with the text box I get literally text in the box as in: C:\Users\mlaroda\Desktop\M
With the OLE Object box I get nothing but a blank box, I’m not a programmer so please keep it as simple as possible, the code I have is below
Private Sub Command120_Click()
Dim XFLName As Integer
Dim strPic As String
XFLName = ID
strPic = ("C:\Users\mlaroda\Desktop
Me.tbl_Con_Photo = strPic
End Sub
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER