Abbos
05-09-2007, 06:00 AM
Hi,
I have a database whereby from the main DB, users can filter records and view reports of the results.
I have everything working except the the first image for the first record displayed on the report. The code I currently have attached to the On Page event for the report is:
If Not IsNull(Me.Image) Then
Me.ImageFrame.Visible = True
myimage = False
Me.ImageFrame.Picture = Me.Image
Else
Me.ImageFrame.Picture = Location
End If
I have tried adding the code to the On Activate event of the report but this then does not refresh the image as I navigate through the pages.
Can anyone help?
Simon_MT
05-09-2007, 01:11 PM
This code should be on the Detail Section On Format so that the report can evaulate Location assuming that different images apply each record on the report.
Simon
Abbos
05-10-2007, 12:35 AM
Different images do apply to each record on the report but I cannot seem to find the Detail Section On Format. Can you point me in the right direction please?
Abbos
05-10-2007, 12:42 AM
Found it by accident! Will give that a try now.
Abbos
05-10-2007, 12:46 AM
Simon,
Thanks for the pointer. It seems to have solved the problem but the issue it causes is that everytime the report is generated it attempts to "import" all of the images first. Although they are linked, it still takes a while and on some of the bigger reports it takes ages.
Is there a way around this?
Simon_MT
05-10-2007, 05:31 AM
I would check your images sizes, I do understand that Access might have a problem with rendering large images. If you using images with Access it is important to use thumbnails even if this means having two versions. Our images are no bigger than 100K.
Simon
Dragonchaser
08-01-2007, 10:27 AM
Sorry to hijack threads. ;)
I'm having the exact same issue as Abbos, but moving the code to Detail On_Format from Report On_Activate didn't solve my problem. :(
Now when I goto preview the report it won't go at all. I'm stuck in the design screen. :confused: What did I do different?
Can anyone want to help me with this one?
All the best,
Dragonchaser
Simon_MT
08-01-2007, 12:52 PM
Try creating a SubForm with the Image Control and a Query with the variable Field to that dictates the Image File to use and the Image file (Full Name).
All we are doing here is splitting the Image away from the main report and then adding the image as a subform.
Do over-estimate Access ability to handle images, large images certainly annoy Access.
I use an ActiveX control and it works.
Simon
Dragonchaser
08-01-2007, 01:17 PM
Thanks, Simon.
I'll give that a shot.
I'll assume if access doesn't like images, it definitely wouldn't like say 17 images in the same report. :o (It's basically a blueprint that fills in certain parts of the drawing according to what the user enters in the fields)
I'll be making 17 subforms and queries then. :D
Unless there's a shortcut.
Dragonchaser
08-01-2007, 02:46 PM
Sorry Simon, I guess I'm a lot worse at this than I thought. :(
How do I create a query that chooses images?
Should I create a table of objects and have the query pick which object to show based on what the field in the report shows?
Am I sorta on the right track?