V
Vayse
Hi
I have to do a report, where there are several images in sub reports. These
images depend on the Client.
So in the detail format section of the report I have
If IsNull(Me.Photograph) Then
Me.imgPhoto.Picture = BLANK_PHOTO ' Default photo
Else
Me.imgPhoto.Picture = Me.Photograph ' Path to the Photo
End If
Some sub reports don't need a default photo, so in those cases I just do
Me.ImgPhoto.visiblle = False
There are two areas I'd like to improve
1) Speed
It can be slow to load and print.
To speed things up, I used the following code:
If Not bPhotoLoaded Then
If IsNull(Me.Photograph) Then
Me.imgPhoto.Picture = BLANK_PHOTO
Else
Me.imgPhoto.Picture = Me.Photograph
End If
bPhotoLoaded = True
End If
Which works fine for the sub reports where the photo is only loaded once.
However, for example on Client contacts, I want the photo to load for each
contact.
In cases where the photo is in the detail section - is there anyway to stop
the photo having to be loaded each time?
The photo load seems to happen when each recordselector is clicked, and on
printing.
2) Crashing Out
Say the user is a page 16. Then he goes back to page 15. All is fine, he
just waits for the photo to load. If however the user is impatient, and
clicks back to page 14 before the photo is loaded, then access will hang.
Anyway around this?
The photos themselves are usually around 100k in size. I have the picture
type set as linked.
Any advice welcome.
Thanks
Vayse
I have to do a report, where there are several images in sub reports. These
images depend on the Client.
So in the detail format section of the report I have
If IsNull(Me.Photograph) Then
Me.imgPhoto.Picture = BLANK_PHOTO ' Default photo
Else
Me.imgPhoto.Picture = Me.Photograph ' Path to the Photo
End If
Some sub reports don't need a default photo, so in those cases I just do
Me.ImgPhoto.visiblle = False
There are two areas I'd like to improve
1) Speed
It can be slow to load and print.
To speed things up, I used the following code:
If Not bPhotoLoaded Then
If IsNull(Me.Photograph) Then
Me.imgPhoto.Picture = BLANK_PHOTO
Else
Me.imgPhoto.Picture = Me.Photograph
End If
bPhotoLoaded = True
End If
Which works fine for the sub reports where the photo is only loaded once.
However, for example on Client contacts, I want the photo to load for each
contact.
In cases where the photo is in the detail section - is there anyway to stop
the photo having to be loaded each time?
The photo load seems to happen when each recordselector is clicked, and on
printing.
2) Crashing Out
Say the user is a page 16. Then he goes back to page 15. All is fine, he
just waits for the photo to load. If however the user is impatient, and
clicks back to page 14 before the photo is loaded, then access will hang.
Anyway around this?
The photos themselves are usually around 100k in size. I have the picture
type set as linked.
Any advice welcome.
Thanks
Vayse