data shows up only after debugging

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

Guest

I create a form and a button on the form. When I click the button, the code
would send information to the report to be printed out. However, data show up
on the report only when I debug line-by-line (there are no erro at all. I
open connection to the database and recordsets). Otherwise, it prints out
blank pages.
Do you know why?
Thanks,
 
Hi,
The code is very long and involves to the business law that you won't bother
to read. I still can not figure out why I have to trace line by line for the
report to print the data. If I don't do that, the report would print the
blank page :=(

Here is some sample of code:
rsSample.AddNew
rsSample.Fields(0) = strID
rsSample.Fields(1) = rsS.Fields(2)
rsSample.Fields(2) = rsS.Fields(3)
rsSample.Update
rsSample.MoveNext

If rsSample.EOF Then
Exit Do
End If

Loop

DoCmd.OpenReport "rptTGrader", acViewNormal

If you find out something, please let me know,
Thanks, Tim
 
hi,
So you modify tables, report based on, before printing?
try to calcultate record count before printing in both case, maybe this will
give an idea
 
Hi again,
I use the record count as you advice, and yes, it does show up that there
are records in the table before printing out the report. But why it does not
show up in the report???
Do you have any idea about it?
Thank you,
 
Hmm, looks like a miracle.
so reprot you get - only blank pages? no report header?
Maybe you have some code in report's class module?
 
No, it's not a miracle, it's a nightmare to me :). No, I don't have any code
in the report's class module. The program is to get data from a table and
put it in the second table with some calculations. And then the second table
is the record source for the report. That's it!
 
Back
Top