manix
Registered User.
- Local time
- Today, 23:38
- Joined
- Nov 29, 2006
- Messages
- 100
Hi All,
I have a really frustrating problem. I have a report that simply shows a list of records. The records contain file paths for images for various forms and reports within the database.
There are two fileds in each record for the file paths, [Photo] and [Photo2].
In order that the images are displayed with the records I have created 2x image frames and added the following code to the report:
This works fine if the [Photo] and [Photo2] both have file paths, but if there is nothing in [Photo] or [Photo2], then it simply takes the file path from the last record that did have a path in and displays the image from that, completely unrelated record!!! Why is that happening?
In other words if no file path exists for a record, then the report shows the image from the previous record, even though they are not related in anyway!?
I have a really frustrating problem. I have a report that simply shows a list of records. The records contain file paths for images for various forms and reports within the database.
There are two fileds in each record for the file paths, [Photo] and [Photo2].
In order that the images are displayed with the records I have created 2x image frames and added the following code to the report:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull(Me.Photo) Then
Me.imgframe3.Picture = Me.Photo
End If
If Not IsNull(Me.Photo2) Then
Me.imgframe4.Picture = Me.Photo2
End If
End Sub
This works fine if the [Photo] and [Photo2] both have file paths, but if there is nothing in [Photo] or [Photo2], then it simply takes the file path from the last record that did have a path in and displays the image from that, completely unrelated record!!! Why is that happening?
In other words if no file path exists for a record, then the report shows the image from the previous record, even though they are not related in anyway!?