M
mdullni1 via AccessMonster.com
System info: SQLServer backend, Access XP adp front end delivered to each PC
on boot.
I am using Leban's fLoadPicture code to counteract memory leak. The report
is a student directory that loads each student's jpg picture or a "No Image
Available" jpg, 6 students to a page. When a 143 page report was printed,
starting around page 117, random pictures did not load correctly. There are
blank images or the same image for multiple students.
In researching this problem, I found a couple of statements that said this
function is only for runtime version of Access. Should I not use this
function? When I Just set the picture property I got "out of memory"
messages.
Here is my code:
Const mstrNoImagePath As String = "\\Server\Photos\no_image.jpg"
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
'*****************************************************************************
'* Sub: Detail_Print
'* Purpose: Loads the student photo or "No Image Available" jpg.
'*****************************************************************************
Dim blnRVal As Boolean
'If PrintCount = 1 Then
If Nz(Me!txtPhotoPath, "") <> "" Then
blnRVal = fLoadPicture(Me!imgPhoto, Me!txtPhotoPath, False)
Else
blnRVal = fLoadPicture(Me!imgPhoto, mstrNoImagePath, False)
End If
'End If
End Sub
When first run the printcount statement was not commented out. I commented
it out to see if I still had the picture load problem, which I do.
Any help will be greatly appreciated. The directory has to go to print next
week.
Thanks,
Peg
on boot.
I am using Leban's fLoadPicture code to counteract memory leak. The report
is a student directory that loads each student's jpg picture or a "No Image
Available" jpg, 6 students to a page. When a 143 page report was printed,
starting around page 117, random pictures did not load correctly. There are
blank images or the same image for multiple students.
In researching this problem, I found a couple of statements that said this
function is only for runtime version of Access. Should I not use this
function? When I Just set the picture property I got "out of memory"
messages.
Here is my code:
Const mstrNoImagePath As String = "\\Server\Photos\no_image.jpg"
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
'*****************************************************************************
'* Sub: Detail_Print
'* Purpose: Loads the student photo or "No Image Available" jpg.
'*****************************************************************************
Dim blnRVal As Boolean
'If PrintCount = 1 Then
If Nz(Me!txtPhotoPath, "") <> "" Then
blnRVal = fLoadPicture(Me!imgPhoto, Me!txtPhotoPath, False)
Else
blnRVal = fLoadPicture(Me!imgPhoto, mstrNoImagePath, False)
End If
'End If
End Sub
When first run the printcount statement was not commented out. I commented
it out to see if I still had the picture load problem, which I do.
Any help will be greatly appreciated. The directory has to go to print next
week.
Thanks,
Peg