kec
Registered User.
- Local time
- Today, 03:28
- Joined
- Jan 21, 2005
- Messages
- 17
Here is some code to link images in reports. I've seen this asked several times on this board, so I hope this helps...
This is what you'll get... http://img.photobucket.com/albums/v521/kecline/Access/rptMultImage.jpg
The code verifies that the image exists - if not, the no_image_m.bmp is displayed on the report.
The last 4 images are for the star ratings, which work in the same manner.
-Ken
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
Dim DBpath As String
DBpath = [Forms]![Main]![Img_Path]
If Dir$(DBpath & [ID] & "_1t.bmp") = [ID] & "_1t.bmp" Then
Me.ImageCover1.Picture = DBpath & [ID] & "_1t.bmp"
Else: Me.ImageCover1.Picture = DBpath & No_Image_m.bmp
End If
Me![VideoImage].Picture = DBpath & "stars-" & Me![VideoFile] & ".bmp"
Me![AudioImage].Picture = DBpath & "stars-" & Me![AudioFile] & ".bmp"
Me![ExtrasImage].Picture = DBpath & "stars-" & Me![ExtrasFile] & ".bmp"
Me![MovieImage].Picture = DBpath & "stars-" & Me![MovieFile] & ".bmp"
End Sub
This is what you'll get... http://img.photobucket.com/albums/v521/kecline/Access/rptMultImage.jpg
The code verifies that the image exists - if not, the no_image_m.bmp is displayed on the report.
The last 4 images are for the star ratings, which work in the same manner.
-Ken