E
es330td
Env: XPSP2, Access 2003, 3 Ghz CPU, 1.5 GB RAM
Note: 100% of this code was written by someone else; I have been asked
by my supervisor to solve the problem.
We have a project tracking system based in SQL Server 2005 that tracks
a moderate numbers of projects that has an Access database front end
for data manipulation and report printing. One of the actions
programmed into the database is the ability to print out a single page
report for each project. To do this, Access runs the following code:
(rst is a recordset populated by the database query: Select ProjectID
from vwBulkPrintList)
If Not (rst.EOF) Then
rst.MoveFirst
While Not (rst.EOF)
iRecNo = rst!ProjectID
sLinkCriteria = "ProjectID = " & rst!ProjectID
DoCmd.OpenForm sFormName, , , sLinkCriteria
DoCmd.OpenReport sDocName
DoCmd.Close acForm, sFormName
rst.MoveNext
Wend
End If
So it opens the Access form, populates it and then prints out a report
based on that form. When this runs correctly, the result will be
roughly 300 sheets of paper on the printer. Unfortunately, it has not
run all the way through in some time as something happens part way
through the process and it just quits, presumably because the act of
repeatedly opening the form overwhelms the system's resources. When I
run this, it just stops. It doesn't report any kind of error and
Access stays open and operational but it quits after around 30
reports.
I really have nothing to debug because it doesn't report any errors.
Does anyone have any suggestions as to how I can even investigate what
is going on to find out what I need to do to get it to print all the
reports?
Note: 100% of this code was written by someone else; I have been asked
by my supervisor to solve the problem.
We have a project tracking system based in SQL Server 2005 that tracks
a moderate numbers of projects that has an Access database front end
for data manipulation and report printing. One of the actions
programmed into the database is the ability to print out a single page
report for each project. To do this, Access runs the following code:
(rst is a recordset populated by the database query: Select ProjectID
from vwBulkPrintList)
If Not (rst.EOF) Then
rst.MoveFirst
While Not (rst.EOF)
iRecNo = rst!ProjectID
sLinkCriteria = "ProjectID = " & rst!ProjectID
DoCmd.OpenForm sFormName, , , sLinkCriteria
DoCmd.OpenReport sDocName
DoCmd.Close acForm, sFormName
rst.MoveNext
Wend
End If
So it opens the Access form, populates it and then prints out a report
based on that form. When this runs correctly, the result will be
roughly 300 sheets of paper on the printer. Unfortunately, it has not
run all the way through in some time as something happens part way
through the process and it just quits, presumably because the act of
repeatedly opening the form overwhelms the system's resources. When I
run this, it just stops. It doesn't report any kind of error and
Access stays open and operational but it quits after around 30
reports.
I really have nothing to debug because it doesn't report any errors.
Does anyone have any suggestions as to how I can even investigate what
is going on to find out what I need to do to get it to print all the
reports?