Delay code execution

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that includes a sub report. The sub report calculates totals
based upon the record displayed in the form. I have code that executes and
calculates these and stores the values in a table. The sub report looks at
this table for the data. If I run the code so that the code runs and then
calls the report it fails to display the subreport for the first record. If I
step through the code it works fine. Is there a way to delay the calling of
the report after execution of the code as this appears to be a timing problem.
 
There isn't a sub form. The table is populated from code via an ado
recordset. All of this code executes before the report is called. The Sub
report which is populated from this table doesn't popultae for the first
record but does for the second. Each record is an invoice and is displayed
one per page. The sub report is in the Invoice number footer. If I put a
break in before the report is called and step through it works properley
henace the reqiuirement to pause after populating the table but before
calling the report.

Regards
Paul
 
Hi Paul,

subform or not, the point is that you need to save the data before
opening the report.

What is the code you are using to process the report? If you post it,
we may see something that needs to be added or modified.

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top