Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / September 2006

Tip: Looking for answers? Try searching our database.

fLoadPicture only for runtime version and problems printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mdullni1 - 25 Sep 2006 16:04 GMT
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
Stephen Lebans - 25 Sep 2006 20:35 GMT
The solution was developed for Runtime installs but can be used for full
installs as well(though it is not necessary).

Access is not the best host to render large reports containing Images. A
quick fix is to simply output half of your report at a time. For a longer
term fix, try removing my code and going back to the standard Image control.
Make sure you modify the Registry to turn off the Loading Image dialog and
keep your code in the section's Print event.

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> System info: SQLServer backend, Access XP adp front end delivered to each
> PC
[quoted text clipped - 47 lines]
> Thanks,
> Peg
mdullni1 - 26 Sep 2006 13:36 GMT
Thanks Stephen.  Is it possible to change the registry from VBA each time
this report is run?  I can't garantee that the registry setting on the user's
system will always stay off.

Peg

>The solution was developed for Runtime installs but can be used for full
>installs as well(though it is not necessary).
[quoted text clipped - 10 lines]
>> Thanks,
>> Peg
Stephen Lebans - 27 Sep 2006 03:28 GMT
Sure you could change them. I have not tested though whether Access would
recognize the changes during the current open session.

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> Thanks Stephen.  Is it possible to change the registry from VBA each time
> this report is run?  I can't garantee that the registry setting on the
[quoted text clipped - 19 lines]
>>> Thanks,
>>> Peg
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.